1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
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;
10 background: #FFFFFF; }
12 p { text-align: justify; }
13 h1 { text-align: center; }
14 li { text-align: justify; }
15 td { padding: 0 0.5em 0 0.5em; }
16 td.left { padding: 0 0.5em 0 0.5em;
19 a:link { color: #0000EF; }
20 a:visited { color: #51188E; }
21 a:hover { color: #FF0000; }
23 span.keyword { font-family: monospace;
28 pre.colored { color: blue; }
30 ul.empty { list-style-type: none; }
35 <table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
36 <td width="100%"></td>
37 <td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
38 <center><h1>FreeType-2.4.3 API Reference</h1></center>
44 <table align=center cellspacing=5 cellpadding=0 border=0>
45 <tr><td></td><td><a href="#FT_SfntName">FT_SfntName</a></td></tr>
46 <tr><td></td><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td></tr>
47 <tr><td></td><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td></tr>
48 <tr><td></td><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td></tr>
49 <tr><td></td><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td></tr>
52 <table align=center width="87%"><tr><td>
53 <p>The TrueType and OpenType specifications 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>
54 <p>The definitions below are used to access them if available.</p>
55 <p>Note that this has nothing to do with glyph names!</p>
56 </td></tr></table><br>
57 <table align=center width="75%"><tr><td>
58 <h4><a name="FT_SfntName">FT_SfntName</a></h4>
59 <table align=center width="87%"><tr><td>
60 Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
61 </td></tr></table><br>
62 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
64 <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SfntName_
66 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> platform_id;
67 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> encoding_id;
68 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> language_id;
69 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> name_id;
71 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* string; /* this string is *not* null-terminated! */
72 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> string_len; /* in bytes */
77 <table align=center width="87%"><tr><td>
78 <p>A structure used to model an SFNT ‘name’ table entry.</p>
79 </td></tr></table><br>
80 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
82 <table cellpadding=3 border=0>
83 <tr valign=top><td><b>platform_id</b></td><td>
84 <p>The platform ID for ‘string’.</p>
86 <tr valign=top><td><b>encoding_id</b></td><td>
87 <p>The encoding ID for ‘string’.</p>
89 <tr valign=top><td><b>language_id</b></td><td>
90 <p>The language ID for ‘string’.</p>
92 <tr valign=top><td><b>name_id</b></td><td>
93 <p>An identifier for ‘string’.</p>
95 <tr valign=top><td><b>string</b></td><td>
96 <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>
97 <p>Generally speaking, the string is not zero-terminated. Please refer to the TrueType specification for details.</p>
99 <tr valign=top><td><b>string_len</b></td><td>
100 <p>The length of ‘string’ in bytes.</p>
104 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
105 <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>
106 <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>
110 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
111 <td width="100%"></td>
112 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
114 <table align=center width="75%"><tr><td>
115 <h4><a name="FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></h4>
116 <table align=center width="87%"><tr><td>
117 Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
118 </td></tr></table><br>
119 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
121 FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
122 <b>FT_Get_Sfnt_Name_Count</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
125 <table align=center width="87%"><tr><td>
126 <p>Retrieve the number of name strings in the SFNT ‘name’ table.</p>
127 </td></tr></table><br>
128 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
130 <table cellpadding=3 border=0>
131 <tr valign=top><td><b>face</b></td><td>
132 <p>A handle to the source face.</p>
136 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
137 <p>The number of strings in the ‘name’ table.</p>
141 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
142 <td width="100%"></td>
143 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
145 <table align=center width="75%"><tr><td>
146 <h4><a name="FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></h4>
147 <table align=center width="87%"><tr><td>
148 Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
149 </td></tr></table><br>
150 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
152 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
153 <b>FT_Get_Sfnt_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
154 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> idx,
155 <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a> *aname );
158 <table align=center width="87%"><tr><td>
159 <p>Retrieve a string of the SFNT ‘name’ table for a given index.</p>
160 </td></tr></table><br>
161 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
163 <table cellpadding=3 border=0>
164 <tr valign=top><td><b>face</b></td><td>
165 <p>A handle to the source face.</p>
167 <tr valign=top><td><b>idx</b></td><td>
168 <p>The index of the ‘name’ string.</p>
172 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
174 <table cellpadding=3 border=0>
175 <tr valign=top><td><b>aname</b></td><td>
176 <p>The indexed <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a> structure.</p>
180 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
181 <p>FreeType error code. 0 means success.</p>
183 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
184 <p>The ‘string’ array returned in the ‘aname’ structure is not null-terminated. The application should deallocate it if it is no longer in use.</p>
185 <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 ‘name’ table entries, then do a loop until you get the right platform, encoding, and name ID.</p>
189 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
190 <td width="100%"></td>
191 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
193 <table align=center width="75%"><tr><td>
194 <h4><a name="FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></h4>
195 <table align=center width="87%"><tr><td>
196 Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
197 </td></tr></table><br>
198 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
200 #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' )
203 <table align=center width="87%"><tr><td>
204 <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 ‘name’ table since OpenType version 1.4. For backwards compatibility with legacy systems which has 4-face-per-family restriction.</p>
205 </td></tr></table><br>
208 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
209 <td width="100%"></td>
210 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
212 <table align=center width="75%"><tr><td>
213 <h4><a name="FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></h4>
214 <table align=center width="87%"><tr><td>
215 Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
216 </td></tr></table><br>
217 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
219 #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' )
222 <table align=center width="87%"><tr><td>
223 <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 ‘name’ table since OpenType version 1.4. For backwards compatibility with legacy systems which has 4-face-per-family restriction.</p>
224 </td></tr></table><br>
227 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
228 <td width="100%"></td>
229 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>