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

📄 ft2-sfnt_names.html

📁 嵌入式freetype库的应用文档包含freetype的简要说明和应用example
💻 HTML
字号:
<!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>SFNT Names</h1></center><h2>Synopsis</h2><table align=center cellspacing=5 cellpadding=0 border=0><tr><td></td><td><a href="#FT_SfntName">FT_SfntName</a></td><td></td><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td></td><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td></tr></table><br><br><table align=center width="87%"><tr><td><p>The TrueType and OpenType specification allow the inclusion of a special `names table' in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.</p><p>The definitions below are used to access them if available.</p><p>Note that this has nothing to do with glyph names!</p></td></tr></table><br><table align=center width="75%"><tr><td><h4><a name="FT_SfntName">FT_SfntName</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_SfntName_  {    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  platform_id;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  encoding_id;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  language_id;    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  name_id;    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*   string;      /* this string is *not* null-terminated! */    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    string_len;  /* in bytes */  } <b>FT_SfntName</b>;</pre></table><br><table align=center width="87%"><tr><td><p>A structure used to model an SFNT `name' table entry.</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>platform_id</b></td><td><p>The platform ID for `string'.</p></td></tr><tr valign=top><td><b>encoding_id</b></td><td><p>The encoding ID for `string'.</p></td></tr><tr valign=top><td><b>language_id</b></td><td><p>The language ID for `string'.</p></td></tr><tr valign=top><td><b>name_id</b></td><td><p>An identifier for `string'.</p></td></tr><tr valign=top><td><b>string</b></td><td><p>The `name' string. Note that its format differs depending on the (platform,encoding) pair. It can be a Pascal String, a UTF-16 one, etc..</p><p>Generally speaking, the string is not zero-terminated. Please refer to the TrueType specification for details..</p></td></tr><tr valign=top><td><b>string_len</b></td><td><p>The length of `string' in bytes.</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>Possible values for `platform_id', `encoding_id', `language_id', and `name_id' are given in the file `ttnameid.h'. For details please refer to the TrueType or OpenType specification.</p></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>  FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )  <b>FT_Get_Sfnt_Name_Count</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );</pre></table><br><table align=center width="87%"><tr><td><p>Retrieves the number of name strings in the SFNT `name' table.</p></td></tr></table><br><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td><table cellpadding=3><tr valign=top><td><b>face</b></td><td><p>A handle to the source face.</p></td></tr></table></td></tr></table><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td><p>The number of strings in the `name' table.</p></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )  <b>FT_Get_Sfnt_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>       face,                    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>       idx,                    <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a>  *aname );</pre></table><br><table align=center width="87%"><tr><td><p>Retrieves a string of the SFNT `name' table for a given index.</p></td></tr></table><br><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td><table cellpadding=3><tr valign=top><td><b>face</b></td><td><p>A handle to the source face.</p></td></tr><tr valign=top><td><b>idx</b></td><td><p>The index of the `name' string.</p></td></tr></table></td></tr></table><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td><table cellpadding=3><tr valign=top><td><b>aname</b></td><td><p>The indexed FT_SfntName structure.</p></td></tr></table></td></tr></table><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td><p>FreeType error code. 0 means success.</p></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 `string' array returned in the `aname' structure is not null-terminated.</p><p>Use FT_Get_Sfnt_Name_Count() to get the total number of available `name' table entries, then do a loop until you get the right platform, encoding, and name ID.</p></td></tr></table></td></tr></table><hr width="75%"></body></html>

⌨️ 快捷键说明

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