📄 ft2-base_interface.html
字号:
<p>The encoding value 0 is reserved.</p></td></tr><tr valign=top><td><b>FT_ENCODING_UNICODE</b></td><td><p>Corresponds to the Unicode character set. This value covers all versions of the Unicode repertoire, including ASCII and Latin-1. Most fonts include a Unicode charmap, but not all of them.</p></td></tr><tr valign=top><td><b>FT_ENCODING_MS_SYMBOL</b></td><td><p>Corresponds to the Microsoft Symbol encoding, used to encode mathematical symbols in the 32..255 character code range. For more information, see `http://www.ceviz.net/symbol.htm'.</p></td></tr><tr valign=top><td><b>FT_ENCODING_SJIS</b></td><td><p>Corresponds to Japanese SJIS encoding. More info at at `http://langsupport.japanreference.com/encoding.shtml'. See note on multi-byte encodings below.</p></td></tr><tr valign=top><td><b>FT_ENCODING_GB2312</b></td><td><p>Corresponds to an encoding system for Simplified Chinese as used used in mainland China.</p></td></tr><tr valign=top><td><b>FT_ENCODING_BIG5</b></td><td><p>Corresponds to an encoding system for Traditional Chinese as used in Taiwan and Hong Kong.</p></td></tr><tr valign=top><td><b>FT_ENCODING_WANSUNG</b></td><td><p>Corresponds to the Korean encoding system known as Wansung. For more information see `http://www.microsoft.com/typography/unicode/949.txt'.</p></td></tr><tr valign=top><td><b>FT_ENCODING_JOHAB</b></td><td><p>The Korean standard character set (KS C-5601-1992), which corresponds to MS Windows code page 1361. This character set includes all possible Hangeul character combinations.</p></td></tr><tr valign=top><td><b>FT_ENCODING_ADOBE_LATIN_1</b></td><td><p>Corresponds to a Latin-1 encoding as defined in a Type 1 Postscript font. It is limited to 256 character codes.</p></td></tr><tr valign=top><td><b>FT_ENCODING_ADOBE_STANDARD</b></td><td><p>Corresponds to the Adobe Standard encoding, as found in Type 1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p></td></tr><tr valign=top><td><b>FT_ENCODING_ADOBE_EXPERT</b></td><td><p>Corresponds to the Adobe Expert encoding, as found in Type 1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p></td></tr><tr valign=top><td><b>FT_ENCODING_ADOBE_CUSTOM</b></td><td><p>Corresponds to a custom encoding, as found in Type 1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p></td></tr><tr valign=top><td><b>FT_ENCODING_APPLE_ROMAN</b></td><td><p>Corresponds to the 8-bit Apple roman encoding. Many TrueType and OpenType fonts contain a charmap for this encoding, since older versions of Mac OS are able to use it.</p></td></tr><tr valign=top><td><b>FT_ENCODING_OLD_LATIN_2</b></td><td><p>This value is deprecated and was never used nor reported by FreeType. Don't use or test for it.</p></td></tr><tr valign=top><td><b>FT_ENCODING_MS_SJIS</b></td><td><p>Same as FT_ENCODING_SJIS. Deprecated.</p></td></tr><tr valign=top><td><b>FT_ENCODING_MS_GB2312</b></td><td><p>Same as FT_ENCODING_GB2312. Deprecated.</p></td></tr><tr valign=top><td><b>FT_ENCODING_MS_BIG5</b></td><td><p>Same as FT_ENCODING_BIG5. Deprecated.</p></td></tr><tr valign=top><td><b>FT_ENCODING_MS_WANSUNG</b></td><td><p>Same as FT_ENCODING_WANSUNG. Deprecated.</p></td></tr><tr valign=top><td><b>FT_ENCODING_MS_JOHAB</b></td><td><p>Same as FT_ENCODING_JOHAB. Deprecated.</p></td></tr></table></td></tr></table><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td><p>By default, FreeType automatically synthetizes a Unicode charmap for Postscript fonts, using their glyph names dictionaries. However, it will also report the encodings defined explicitly in the font file, for the cases when they are needed, with the Adobe values as well.</p><p>FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap is neither Unicode nor ISO-8859-1 (otherwise it is set to FT_ENCODING_UNICODE). Use `FT_Get_BDF_Charset_ID' to find out which encoding is really present. If, for example, the `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', the font is encoded in KOI8-R.</p><p>FT_ENCODING_NONE is always set (with a single exception) by the winfonts driver. Use `FT_Get_WinFNT_Header' and examine the `charset' field of the `FT_WinFNT_HeaderRec' structure to find out which encoding is really present. For example, FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for Russian).</p><p>FT_ENCODING_NONE is set if `platform_id' is `TT_PLATFORM_MACINTOSH' and `encoding_id' is not `TT_MAC_ID_ROMAN' (otherwise it is set to FT_ENCODING_APPLE_ROMAN).</p><p>If `platform_id' is `TT_PLATFORM_MACINTOSH', use the function `FT_Get_CMap_Language_ID' to query the Mac language ID which may be needed to be able to distinguish Apple encoding variants. See</p><p>http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT</p><p>to get an idea how to do that. Basically, if the language ID is 0, dont use it, otherwise subtract 1 from the language ID. Then examine `encoding_id'. If, for example, `encoding_id' is `TT_MAC_ID_ROMAN' and the language ID (minus 1) is `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. `TT_MAC_ID_ARABIC' with `TT_MAC_LANGID_FARSI' means the Farsi variant the Arabic encoding.</p></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_Glyph_Metrics">FT_Glyph_Metrics</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Glyph_Metrics_ { <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> width; <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> height; <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> horiBearingX; <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> horiBearingY; <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> horiAdvance; <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> vertBearingX; <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> vertBearingY; <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> vertAdvance; } <b>FT_Glyph_Metrics</b>;</pre></table><br><table align=center width="87%"><tr><td><p>A structure used to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag FT_LOAD_NO_SCALE is used, values are returned in font units instead.</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>width</b></td><td><p>The glyph's width.</p></td></tr><tr valign=top><td><b>height</b></td><td><p>The glyph's height.</p></td></tr><tr valign=top><td><b>horiBearingX</b></td><td><p>Left side bearing for horizontal layout.</p></td></tr><tr valign=top><td><b>horiBearingY</b></td><td><p>Top side bearing for horizontal layout.</p></td></tr><tr valign=top><td><b>horiAdvance</b></td><td><p>Advance width for horizontal layout.</p></td></tr><tr valign=top><td><b>vertBearingX</b></td><td><p>Left side bearing for vertical layout.</p></td></tr><tr valign=top><td><b>vertBearingY</b></td><td><p>Top side bearing for vertical layout.</p></td></tr><tr valign=top><td><b>vertAdvance</b></td><td><p>Advance height for vertical layout.</p></td></tr></table></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_Bitmap_Size">FT_Bitmap_Size</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Bitmap_Size_ { <a href="ft2-basic_types.html#FT_Short">FT_Short</a> height; <a href="ft2-basic_types.html#FT_Short">FT_Short</a> width; <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> size; <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> x_ppem; <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> y_ppem; } <b>FT_Bitmap_Size</b>;</pre></table><br><table align=center width="87%"><tr><td><p>This structure models the size of a bitmap strike (i.e., a bitmap instance of the font for a given resolution) in a fixed-size font face. It is used for the `available_sizes' field of the <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> structure.</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>height</b></td><td><p>The (vertical) baseline-to-baseline distance in pixels. It makes most sense to define the height of a bitmap font in this way.</p></td></tr><tr valign=top><td><b>width</b></td><td><p>The average width of the font (in pixels). Since the algorithms to compute this value are different for the various bitmap formats, it can only give an additional hint if the `height' value isn't sufficient to select the proper font. For monospaced fonts the average width is the same as the maximum width.</p></td></tr><tr valign=top><td><b>size</b></td><td><p>The point size in 26.6 fractional format this font shall represent (for a given vertical resolution).</p></td></tr><tr valign=top><td><b>x_ppem</b></td><td><p>The horizontal ppem value (in 26.6 fractional format).</p></td></tr><tr valign=top><td><b>y_ppem</b></td><td><p>The vertical ppem value (in 26.6 fractional format). Usually, this is the `nominal' pixel height of the font.</p></td></tr></table></td></tr></table><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td><p>The values in this structure are taken from the bitmap font. If the font doesn't provide a parameter it is set to zero to indicate that the information is not available.</p><p>The following formula converts from dpi to ppem:</p><p>ppem = size * dpi / 72</p><p>where `size' is in points.</p><p>Windows FNT: The `size' parameter is not reliable: There exist fonts (e.g., app850.fon) which have a wrong size for some subfonts; x_ppem and y_ppem are thus set equal to pixel width and height given in in the Windows FNT header.</p><p>TrueType embedded bitmaps: `size', `width', and `height' values are not contained in the bitmap strike itself. They are computed from the global font parameters.</p></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_Module">FT_Module</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ModuleRec_* <b>FT_Module</b>;</pre></table><br><table align=center width="87%"><tr><td><p>A handle to a given FreeType module object. Each module can be a font driver, a renderer, or anything else that provides services to the formers.</p></td></tr></table><br></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_Driver">FT_Driver</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_DriverRec_* <b>FT_Driver</b>;</pre></table><br><table align=center width="87%"><tr><td><p>A handle to a given FreeType font driver object. Each font driver is a special module capable of creating faces from font files.</p></td></tr></table><br></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_Renderer">FT_Renderer</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RendererRec_* <b>FT_Renderer</b>;</pre></table><br><table align=center width="87%"><tr><td><p>A handle to a given FreeType renderer. A renderer is a special module in charge of converting a glyph image to a bitmap, when necessary. Each renderer supports a given glyph image format, and one or more target surface depths.</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -