/modules/freetype2/docs/reference/ft2-sfnt_names.html

http://github.com/zpao/v8monkey · HTML · 232 lines · 207 code · 25 blank · 0 comment · 0 complexity · f229cc8696c1dcd0b174b3d01a0a304f MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>FreeType-2.4.3 API Reference</title>
  7. <style type="text/css">
  8. body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
  9. color: #000000;
  10. background: #FFFFFF; }
  11. p { text-align: justify; }
  12. h1 { text-align: center; }
  13. li { text-align: justify; }
  14. td { padding: 0 0.5em 0 0.5em; }
  15. td.left { padding: 0 0.5em 0 0.5em;
  16. text-align: left; }
  17. a:link { color: #0000EF; }
  18. a:visited { color: #51188E; }
  19. a:hover { color: #FF0000; }
  20. span.keyword { font-family: monospace;
  21. text-align: left;
  22. white-space: pre;
  23. color: darkblue; }
  24. pre.colored { color: blue; }
  25. ul.empty { list-style-type: none; }
  26. </style>
  27. </head>
  28. <body>
  29. <table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
  30. <td width="100%"></td>
  31. <td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  32. <center><h1>FreeType-2.4.3 API Reference</h1></center>
  33. <center><h1>
  34. SFNT Names
  35. </h1></center>
  36. <h2>Synopsis</h2>
  37. <table align=center cellspacing=5 cellpadding=0 border=0>
  38. <tr><td></td><td><a href="#FT_SfntName">FT_SfntName</a></td></tr>
  39. <tr><td></td><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td></tr>
  40. <tr><td></td><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td></tr>
  41. <tr><td></td><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td></tr>
  42. <tr><td></td><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td></tr>
  43. </table><br><br>
  44. <table align=center width="87%"><tr><td>
  45. <p>The TrueType and OpenType specifications allow the inclusion of a special &lsquo;names table&rsquo; in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.</p>
  46. <p>The definitions below are used to access them if available.</p>
  47. <p>Note that this has nothing to do with glyph names!</p>
  48. </td></tr></table><br>
  49. <table align=center width="75%"><tr><td>
  50. <h4><a name="FT_SfntName">FT_SfntName</a></h4>
  51. <table align=center width="87%"><tr><td>
  52. Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
  53. </td></tr></table><br>
  54. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  55. <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SfntName_
  56. {
  57. <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> platform_id;
  58. <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> encoding_id;
  59. <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> language_id;
  60. <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> name_id;
  61. <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* string; /* this string is *not* null-terminated! */
  62. <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> string_len; /* in bytes */
  63. } <b>FT_SfntName</b>;
  64. </pre></table><br>
  65. <table align=center width="87%"><tr><td>
  66. <p>A structure used to model an SFNT &lsquo;name&rsquo; table entry.</p>
  67. </td></tr></table><br>
  68. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
  69. <p></p>
  70. <table cellpadding=3 border=0>
  71. <tr valign=top><td><b>platform_id</b></td><td>
  72. <p>The platform ID for &lsquo;string&rsquo;.</p>
  73. </td></tr>
  74. <tr valign=top><td><b>encoding_id</b></td><td>
  75. <p>The encoding ID for &lsquo;string&rsquo;.</p>
  76. </td></tr>
  77. <tr valign=top><td><b>language_id</b></td><td>
  78. <p>The language ID for &lsquo;string&rsquo;.</p>
  79. </td></tr>
  80. <tr valign=top><td><b>name_id</b></td><td>
  81. <p>An identifier for &lsquo;string&rsquo;.</p>
  82. </td></tr>
  83. <tr valign=top><td><b>string</b></td><td>
  84. <p>The &lsquo;name&rsquo; string. Note that its format differs depending on the (platform,encoding) pair. It can be a Pascal String, a UTF-16 one, etc.</p>
  85. <p>Generally speaking, the string is not zero-terminated. Please refer to the TrueType specification for details.</p>
  86. </td></tr>
  87. <tr valign=top><td><b>string_len</b></td><td>
  88. <p>The length of &lsquo;string&rsquo; in bytes.</p>
  89. </td></tr>
  90. </table>
  91. </td></tr></table>
  92. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  93. <p>Possible values for &lsquo;platform_id&rsquo;, &lsquo;encoding_id&rsquo;, &lsquo;language_id&rsquo;, and &lsquo;name_id&rsquo; are given in the file &lsquo;ttnameid.h&rsquo;. For details please refer to the TrueType or OpenType specification.</p>
  94. <p>See also <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a>, <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a>, and <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a>.</p>
  95. </td></tr></table>
  96. </td></tr></table>
  97. <hr width="75%">
  98. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  99. <td width="100%"></td>
  100. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  101. <table align=center width="75%"><tr><td>
  102. <h4><a name="FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></h4>
  103. <table align=center width="87%"><tr><td>
  104. Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
  105. </td></tr></table><br>
  106. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  107. FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
  108. <b>FT_Get_Sfnt_Name_Count</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
  109. </pre></table><br>
  110. <table align=center width="87%"><tr><td>
  111. <p>Retrieve the number of name strings in the SFNT &lsquo;name&rsquo; table.</p>
  112. </td></tr></table><br>
  113. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  114. <p></p>
  115. <table cellpadding=3 border=0>
  116. <tr valign=top><td><b>face</b></td><td>
  117. <p>A handle to the source face.</p>
  118. </td></tr>
  119. </table>
  120. </td></tr></table>
  121. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  122. <p>The number of strings in the &lsquo;name&rsquo; table.</p>
  123. </td></tr></table>
  124. </td></tr></table>
  125. <hr width="75%">
  126. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  127. <td width="100%"></td>
  128. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  129. <table align=center width="75%"><tr><td>
  130. <h4><a name="FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></h4>
  131. <table align=center width="87%"><tr><td>
  132. Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
  133. </td></tr></table><br>
  134. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  135. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  136. <b>FT_Get_Sfnt_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
  137. <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> idx,
  138. <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a> *aname );
  139. </pre></table><br>
  140. <table align=center width="87%"><tr><td>
  141. <p>Retrieve a string of the SFNT &lsquo;name&rsquo; table for a given index.</p>
  142. </td></tr></table><br>
  143. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  144. <p></p>
  145. <table cellpadding=3 border=0>
  146. <tr valign=top><td><b>face</b></td><td>
  147. <p>A handle to the source face.</p>
  148. </td></tr>
  149. <tr valign=top><td><b>idx</b></td><td>
  150. <p>The index of the &lsquo;name&rsquo; string.</p>
  151. </td></tr>
  152. </table>
  153. </td></tr></table>
  154. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
  155. <p></p>
  156. <table cellpadding=3 border=0>
  157. <tr valign=top><td><b>aname</b></td><td>
  158. <p>The indexed <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a> structure.</p>
  159. </td></tr>
  160. </table>
  161. </td></tr></table>
  162. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  163. <p>FreeType error code. 0&nbsp;means success.</p>
  164. </td></tr></table>
  165. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  166. <p>The &lsquo;string&rsquo; array returned in the &lsquo;aname&rsquo; structure is not null-terminated. The application should deallocate it if it is no longer in use.</p>
  167. <p>Use <a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a> to get the total number of available &lsquo;name&rsquo; table entries, then do a loop until you get the right platform, encoding, and name ID.</p>
  168. </td></tr></table>
  169. </td></tr></table>
  170. <hr width="75%">
  171. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  172. <td width="100%"></td>
  173. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  174. <table align=center width="75%"><tr><td>
  175. <h4><a name="FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></h4>
  176. <table align=center width="87%"><tr><td>
  177. Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
  178. </td></tr></table><br>
  179. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  180. #define <b>FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</b> <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 'f' )
  181. </pre></table><br>
  182. <table align=center width="87%"><tr><td>
  183. <p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to make FT_Open_Face() ignore preferred family subfamily names in &lsquo;name&rsquo; table since OpenType version 1.4. For backwards compatibility with legacy systems which has 4-face-per-family restriction.</p>
  184. </td></tr></table><br>
  185. </td></tr></table>
  186. <hr width="75%">
  187. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  188. <td width="100%"></td>
  189. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  190. <table align=center width="75%"><tr><td>
  191. <h4><a name="FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></h4>
  192. <table align=center width="87%"><tr><td>
  193. Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
  194. </td></tr></table><br>
  195. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  196. #define <b>FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</b> <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 's' )
  197. </pre></table><br>
  198. <table align=center width="87%"><tr><td>
  199. <p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to make FT_Open_Face() ignore preferred subfamily names in &lsquo;name&rsquo; table since OpenType version 1.4. For backwards compatibility with legacy systems which has 4-face-per-family restriction.</p>
  200. </td></tr></table><br>
  201. </td></tr></table>
  202. <hr width="75%">
  203. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  204. <td width="100%"></td>
  205. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  206. </body>
  207. </html>