⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ft2-base_interface.html

📁 嵌入式freetype库的应用文档包含freetype的简要说明和应用example
💻 HTML
📖 第 1 页 / 共 5 页
字号:
  } <b>FT_FaceRec</b>;</pre></table><br><table align=center width="87%"><tr><td><p>FreeType root face class structure. A face object models the resolution and point-size independent data found in a font file.</p></td></tr></table><br><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td><table cellpadding=3><tr valign=top><td><b>num_faces</b></td><td><p>In the case where the face is located in a collection (i.e., a file which embeds several faces), this is the total number of faces found in the resource. 1 by default. Accessing non-existent face indices causes an error.</p></td></tr><tr valign=top><td><b>face_index</b></td><td><p>The index of the face in its font file. Usually, this is 0 for all normal font formats. It can be &gt; 0 in the case of collections (which embed several fonts in a single resource/file).</p></td></tr><tr valign=top><td><b>face_flags</b></td><td><p>A set of bit flags that give important information about the face; see the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a> constants for details.</p></td></tr><tr valign=top><td><b>style_flags</b></td><td><p>A set of bit flags indicating the style of the face (i.e., italic, bold, underline, etc). See the <a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a> constants.</p></td></tr><tr valign=top><td><b>num_glyphs</b></td><td><p>The total number of glyphs in the face.</p></td></tr><tr valign=top><td><b>family_name</b></td><td><p>The face's family name. This is an ASCII string, usually in English, which describes the typeface's family (like `Times New Roman', `Bodoni', `Garamond', etc). This is a least common denominator used to list fonts. Some formats (TrueType &amp; OpenType) provide localized and Unicode versions of this string. Applications should use the format specific interface to access them.</p></td></tr><tr valign=top><td><b>style_name</b></td><td><p>The face's style name. This is an ASCII string, usually in English, which describes the typeface's style (like `Italic', `Bold', `Condensed', etc). Not all font formats provide a style name, so this field is optional, and can be set to NULL. As for `family_name', some formats provide localized/Unicode versions of this string. Applications should use the format specific interface to access them.</p></td></tr><tr valign=top><td><b>num_fixed_sizes</b></td><td><p>The number of fixed sizes available in this face. This should be set to 0 for scalable fonts, unless its face includes a set of glyphs (called a `strike') for the specified sizes.</p></td></tr><tr valign=top><td><b>available_sizes</b></td><td><p>An array of sizes specifying the available bitmap/graymap sizes that are contained in in the font face. Should be set to NULL if the field `num_fixed_sizes' is set to 0.</p></td></tr><tr valign=top><td><b>num_charmaps</b></td><td><p>The total number of character maps in the face.</p></td></tr><tr valign=top><td><b>charmaps</b></td><td><p>A table of pointers to the face's charmaps. Used to scan the list of available charmaps -- this table might change after a call to <a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a> or <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a> (e.g. if used to hook an additional encoding or CMap to the face object).</p></td></tr><tr valign=top><td><b>generic</b></td><td><p>A field reserved for client uses. See the <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a> type description.</p></td></tr><tr valign=top><td><b>bbox</b></td><td><p>The font bounding box. Coordinates are expressed in font units (see units_per_EM). The box is large enough to contain any glyph from the font. Thus, bbox.yMax can be seen as the `maximal ascender', bbox.yMin as the `minimal descender', and the maximal glyph width is given by `bbox.xMax-bbox.xMin' (not to be confused with the maximal <i>advance_width</i> Only relevant for scalable formats.</p></td></tr><tr valign=top><td><b>units_per_EM</b></td><td><p>The number of font units per EM square for this face. This is typically 2048 for TrueType fonts, 1000 for Type1 fonts, and should be set to the (unrealistic) value 1 for fixed-sizes fonts. Only relevant for scalable formats.</p></td></tr><tr valign=top><td><b>ascender</b></td><td><p>The face's ascender is the vertical distance from the baseline to the topmost point of any glyph in the face. This field's value is positive, expressed in font units. Some font designs use a value different from `bbox.yMax'. Only relevant for scalable formats.</p></td></tr><tr valign=top><td><b>descender</b></td><td><p>The face's descender is the vertical distance from the baseline to the bottommost point of any glyph in the face. This field's value is <b>negative</b> for values below the baseline. It is expressed in font units. Some font designs use a value different from `bbox.yMin'. Only relevant for scalable formats.</p></td></tr><tr valign=top><td><b>height</b></td><td><p>The face's height is the vertical distance from one baseline to the next when writing several lines of text. Its value is always positive, expressed in font units. The value can be computed as `ascender+descender+line_gap' where the value of `line_gap' is also called `external leading'. Only relevant for scalable formats.</p></td></tr><tr valign=top><td><b>max_advance_width</b></td><td><p>The maximal advance width, in font units, for all glyphs in this face. This can be used to make word wrapping computations faster. Only relevant for scalable formats.</p></td></tr><tr valign=top><td><b>max_advance_height</b></td><td><p>The maximal advance height, in font units, for all glyphs in this face. This is only relevant for vertical layouts, and should be set to the `height' for fonts that do not provide vertical metrics. Only relevant for scalable formats.</p></td></tr><tr valign=top><td><b>underline_position</b></td><td><p>The position, in font units, of the underline line for this face. It's the center of the underlining stem. Only relevant for scalable formats.</p></td></tr><tr valign=top><td><b>underline_thickness</b></td><td><p>The thickness, in font units, of the underline for this face. Only relevant for scalable formats.</p></td></tr><tr valign=top><td><b>glyph</b></td><td><p>The face's associated glyph slot(s). This object is created automatically with a new face object. However, certain kinds of applications (mainly tools like converters) can need more than one slot to ease their task.</p></td></tr><tr valign=top><td><b>size</b></td><td><p>The current active size for this face.</p></td></tr><tr valign=top><td><b>charmap</b></td><td><p>The current active charmap for this face.</p></td></tr></table></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a>          ( 1L &lt;&lt;  0 )#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a>       ( 1L &lt;&lt;  1 )#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_WIDTH</a>       ( 1L &lt;&lt;  2 )#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a>              ( 1L &lt;&lt;  3 )#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a>        ( 1L &lt;&lt;  4 )#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a>          ( 1L &lt;&lt;  5 )#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a>           ( 1L &lt;&lt;  6 )#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FAST_GLYPHS</a>       ( 1L &lt;&lt;  7 )#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_MULTIPLE_MASTERS</a>  ( 1L &lt;&lt;  8 )#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_GLYPH_NAMES</a>       ( 1L &lt;&lt;  9 )#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_EXTERNAL_STREAM</a>   ( 1L &lt;&lt; 10 )</pre></table><br><table align=center width="87%"><tr><td><p>A list of bit flags used in the `face_flags' field of the <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> structure. They inform client applications of properties of the corresponding face.</p></td></tr></table><br><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td><table cellpadding=3><tr valign=top><td><b>FT_FACE_FLAG_SCALABLE</b></td><td><p>Indicates that the face provides vectorial outlines. This doesn't prevent embedded bitmaps, i.e., a face can have both this bit and <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a> set.</p></td></tr><tr valign=top><td><b>FT_FACE_FLAG_FIXED_SIZES</b></td><td><p>Indicates that the face contains `fixed sizes', i.e., bitmap strikes for some given pixel sizes. See the `num_fixed_sizes' and `available_sizes' fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p></td></tr><tr valign=top><td><b>FT_FACE_FLAG_FIXED_WIDTH</b></td><td><p>Indicates that the face contains fixed-width characters (like Courier, Lucido, MonoType, etc.).</p></td></tr><tr valign=top><td><b>FT_FACE_FLAG_SFNT</b></td><td><p>Indicates that the face uses the `sfnt' storage scheme. For now, this means TrueType and OpenType.</p></td></tr><tr valign=top><td><b>FT_FACE_FLAG_HORIZONTAL</b></td><td><p>Indicates that the face contains horizontal glyph metrics. This should be set for all common formats.</p></td></tr><tr valign=top><td><b>FT_FACE_FLAG_VERTICAL</b></td><td><p>Indicates that the face contains vertical glyph metrics. This is only available in some formats, not all of them.</p></td></tr><tr valign=top><td><b>FT_FACE_FLAG_KERNING</b></td><td><p>Indicates that the face contains kerning information. If set, the kerning distance can be retrieved through the function <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>. Note that if unset, this function will always return the vector (0,0).</p></td></tr><tr valign=top><td><b>FT_FACE_FLAG_FAST_GLYPHS</b></td><td><p>THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.</p></td></tr><tr valign=top><td><b>FT_FACE_FLAG_MULTIPLE_MASTERS</b></td><td><p>Indicates that the font contains multiple masters and is capable of interpolating between them. See the multiple-masters specific API for details.</p></td></tr><tr valign=top><td><b>FT_FACE_FLAG_GLYPH_NAMES</b></td><td><p>Indicates that the font contains glyph names that can be retrieved through <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a>. Note that some TrueType fonts contain broken glyph name tables. Use the function <a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a> when needed.</p></td></tr><tr valign=top><td><b>FT_FACE_FLAG_EXTERNAL_STREAM</b></td><td><p>Used internally by FreeType to indicate that a face's stream was provided by the client application and should not be destroyed when <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> is called. Don't read or test this flag.</p></td></tr></table></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>#define <b>FT_HAS_HORIZONTAL</b>( face ) \          ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a> )</pre></table><br><table align=center width="87%"><tr><td><p>A macro that returns true whenever a face object contains horizontal metrics (this is true for all font formats though).</p></td></tr></table><br><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>also</b></em></td></tr><tr><td><p><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a> can be used to check for vertical metrics.</p></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>#define <b>FT_HAS_VERTICAL</b>( face ) \          ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a> )</pre></table><br><table align=center width="87%"><tr><td><p>A macro that returns true whenever a face object contains vertical metrics.</p></td></tr></table><br></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_HAS_KERNING">FT_HAS_KERNING</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>#define <b>FT_HAS_KERNING</b>( face ) \          ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a> )</pre></table><br><table align=center width="87%"><tr><td><p>A macro that returns true whenever a face object contains kerning data that can be accessed with <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p></td></tr></table><br></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_IS_SCALABLE">FT_IS_SCALABLE</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>#define <b>FT_IS_SCALABLE</b>( face ) \          ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a> )</pre></table><br><table align=center width="87%"><tr><td><p>A macro that returns true whenever a face object contains a scalable font face (true for TrueType, Type 1, CID, and OpenType/CFF font formats.</p></td></tr></table><br></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_IS_SFNT">FT_IS_SFNT</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>#define <b>FT_IS_SFNT</b>( face ) \          ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a> )

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -