ft2-truetype_tables.html

来自「嵌入式freetype库的应用文档包含freetype的简要说明和应用examp」· HTML 代码 · 共 673 行 · 第 1/3 页

HTML
673
字号
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>FreeType-2.1.10 API Reference</title><style type="text/css">  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;         color: #000000;         background: #FFFFFF; }  p { text-align: justify; }  h1 { text-align: center; }  li { text-align: justify; }  a:link { color: #0000EF; }  a:visited { color: #51188E; }  a:hover { color: #FF0000; }  span.keyword { font-family: monospace;                 text-align: left;                 white-space: pre;                 color: darkblue; }  pre.colored { color: blue; }  ul.empty { list-style-type: none; }</style></head><body><center><h1>FreeType-2.1.10 API Reference</h1></center><center><h1>TrueType Tables</h1></center><h2>Synopsis</h2><table align=center cellspacing=5 cellpadding=0 border=0><tr><td></td><td><a href="#TT_Header">TT_Header</a></td><td></td><td><a href="#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td></tr><tr><td></td><td><a href="#TT_HoriHeader">TT_HoriHeader</a></td><td></td><td><a href="#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td></tr><tr><td></td><td><a href="#TT_VertHeader">TT_VertHeader</a></td><td></td><td><a href="#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td></tr><tr><td></td><td><a href="#TT_OS2">TT_OS2</a></td><td></td><td><a href="#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td></tr><tr><td></td><td><a href="#TT_Postscript">TT_Postscript</a></td><td></td><td><a href="#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td></tr><tr><td></td><td><a href="#TT_PCLT">TT_PCLT</a></td><td></td><td><a href="#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td></tr><tr><td></td><td><a href="#TT_MaxProfile">TT_MaxProfile</a></td><td></td><td></td></tr></table><br><br><table align=center width="87%"><tr><td><p>This section contains the definition of TrueType-specific tables as well as some routines used to access and process them.</p></td></tr></table><br><table align=center width="75%"><tr><td><h4><a name="TT_Header">TT_Header</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  TT_Header_  {    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   Table_Version;    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   Font_Revision;    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    CheckSum_Adjust;    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    Magic_Number;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  Flags;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  Units_Per_EM;    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    Created [2];    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    Modified[2];    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   xMin;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   yMin;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   xMax;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   yMax;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  Mac_Style;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  Lowest_Rec_PPEM;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Font_Direction;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Index_To_Loc_Format;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Glyph_Data_Format;  } <b>TT_Header</b>;</pre></table><br><table align=center width="87%"><tr><td><p>A structure used to model a TrueType font header table. All fields follow the TrueType specification.</p></td></tr></table><br></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="TT_HoriHeader">TT_HoriHeader</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  TT_HoriHeader_  {    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   Version;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Ascender;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Descender;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Line_Gap;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  advance_Width_Max;      /* advance width maximum */    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Left_Side_Bearing;  /* minimum left-sb       */    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Right_Side_Bearing; /* minimum right-sb      */    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   xMax_Extent;            /* xmax extents          */    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Slope_Rise;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Slope_Run;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Offset;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Reserved[4];    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   metric_Data_Format;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  number_Of_HMetrics;    /* The following fields are not defined by the TrueType specification */    /* but they are used to connect the metrics header to the relevant    */    /* `HMTX' table.                                                      */    <span class="keyword">void</span>*      <span class="keyword">long_metrics</span>;    <span class="keyword">void</span>*      <span class="keyword">short_metrics</span>;  } <b>TT_HoriHeader</b>;</pre></table><br><table align=center width="87%"><tr><td><p>A structure used to model a TrueType horizontal header, the `hhea' table, as well as the corresponding horizontal metrics table, i.e., the `hmtx' table.</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>Version</b></td><td><p>The table version.</p></td></tr><tr valign=top><td><b>Ascender</b></td><td><p>The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.</p><p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p><p>You should use the `sTypoAscender' field of the OS/2 table instead if you want the correct one.</p></td></tr><tr valign=top><td><b>Descender</b></td><td><p>The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.</p><p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p><p>You should use the `sTypoDescender' field of the OS/2 table instead if you want the correct one.</p></td></tr><tr valign=top><td><b>Line_Gap</b></td><td><p>The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.</p></td></tr><tr valign=top><td><b>advance_Width_Max</b></td><td><p>This field is the maximum of all advance widths found in the font. It can be used to compute the maximum width of an arbitrary string of text.</p></td></tr><tr valign=top><td><b>min_Left_Side_Bearing</b></td><td><p>The minimum left side bearing of all glyphs within the font.</p></td></tr><tr valign=top><td><b>min_Right_Side_Bearing</b></td><td><p>The minimum right side bearing of all glyphs within the font.</p></td></tr><tr valign=top><td><b>xMax_Extent</b></td><td><p>The maximum horizontal extent (i.e., the `width' of a glyph's bounding box) for all glyphs in the font.</p></td></tr><tr valign=top><td><b>caret_Slope_Rise</b></td><td><p>The rise coefficient of the cursor's slope of the cursor (slope=rise/run).</p></td></tr><tr valign=top><td><b>caret_Slope_Run</b></td><td><p>The run coefficient of the cursor's slope.</p></td></tr><tr valign=top><td><b>Reserved</b></td><td><p>10 reserved bytes.</p></td></tr><tr valign=top><td><b>metric_Data_Format</b></td><td><p>Always 0.</p></td></tr><tr valign=top><td><b>number_Of_HMetrics</b></td><td><p>Number of HMetrics entries in the `hmtx' table -- this value can be smaller than the total number of glyphs in the font.</p></td></tr><tr valign=top><td><b>long_metrics</b></td><td><p>A pointer into the `hmtx' table.</p></td></tr><tr valign=top><td><b>short_metrics</b></td><td><p>A pointer into the `hmtx' table.</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>IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields which are different.</p><p>This ensures that a single function in the `ttload' module is able to read both the horizontal and vertical headers.</p></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="TT_VertHeader">TT_VertHeader</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  TT_VertHeader_  {    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   Version;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Ascender;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Descender;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Line_Gap;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  advance_Height_Max;      /* advance height maximum */    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Top_Side_Bearing;    /* minimum left-sb or top-sb       */    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb   */    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   yMax_Extent;             /* xmax or ymax extents            */    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Slope_Rise;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Slope_Run;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Offset;    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Reserved[4];    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   metric_Data_Format;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  number_Of_VMetrics;    /* The following fields are not defined by the TrueType specification */    /* but they're used to connect the metrics header to the relevant     */    /* `HMTX' or `VMTX' table.                                            */    <span class="keyword">void</span>*      <span class="keyword">long_metrics</span>;    <span class="keyword">void</span>*      <span class="keyword">short_metrics</span>;  } <b>TT_VertHeader</b>;</pre></table><br><table align=center width="87%"><tr><td><p>A structure used to model a TrueType vertical header, the `vhea' table, as well as the corresponding vertical metrics table, i.e., the `vmtx' table.</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>Version</b></td><td><p>The table version.</p></td></tr>

⌨️ 快捷键说明

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