1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "https://www.w3.org/TR/html4/loose.dtd">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>FreeType-2.9 API Reference</title>
7 <style type="text/css">
8 a:link { color: #0000EF; }
9 a:visited { color: #51188E; }
10 a:hover { color: #FF0000; }
12 body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
18 div.section { width: 75%;
20 div.section hr { margin: 4ex 0 1ex 0; }
21 div.section h4 { background-color: #EEEEFF;
25 margin: 3ex 0 1.5ex 9%;
26 padding: 0.3ex 0 0.3ex 1%; }
27 div.section p { margin: 1.5ex 0 1.5ex 10%; }
28 div.section pre { margin: 3ex 0 3ex 9%;
29 background-color: #D6E8FF;
30 padding: 2ex 0 2ex 1%; }
31 div.section table.fields { width: 90%;
32 margin: 1.5ex 0 1.5ex 10%; }
33 div.section table.toc { width: 95%;
34 margin: 1.5ex 0 1.5ex 5%; }
35 div.timestamp { text-align: center;
37 margin: 1.5ex 0 1.5ex 0; }
39 h1 { text-align: center; }
40 h3 { font-size: medium;
41 margin: 4ex 0 1.5ex 0; }
43 p { text-align: justify; }
45 pre.colored { color: blue; }
47 span.keyword { font-family: monospace;
52 table.fields td.val { font-weight: bold;
55 vertical-align: baseline;
56 padding: 1ex 1em 1ex 0; }
57 table.fields td.desc { vertical-align: baseline;
58 padding: 1ex 0 1ex 1em; }
59 table.fields td.desc p:first-child { margin: 0; }
60 table.fields td.desc p { margin: 1.5ex 0 0 0; }
61 table.index { margin: 6ex auto 6ex auto;
63 border-collapse: separate;
64 border-spacing: 1em 0.3ex; }
65 table.index tr { padding: 0; }
66 table.index td { padding: 0; }
67 table.index-toc-link { width: 100%;
70 margin: 1ex 0 1ex 0; }
71 table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
74 table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
77 table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
80 table.synopsis { margin: 6ex auto 6ex auto;
82 border-collapse: separate;
83 border-spacing: 2em 0.6ex; }
84 table.synopsis tr { padding: 0; }
85 table.synopsis td { padding: 0; }
86 table.toc td.link { width: 30%;
88 vertical-align: baseline;
89 padding: 1ex 1em 1ex 0; }
90 table.toc td.desc { vertical-align: baseline;
91 padding: 1ex 0 1ex 1em;
93 table.toc td.desc p:first-child { margin: 0;
95 table.toc td.desc p { margin: 1.5ex 0 0 0;
102 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
103 <h1>FreeType-2.9 API Reference</h1>
105 <h1 id="winfnt_fonts">Window FNT Files</h1>
107 <table class="synopsis">
108 <tr><td><a href="#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td><td><a href="#FT_WinFNT_Header">FT_WinFNT_Header</a></td><td></td></tr>
109 <tr><td><a href="#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td><td><a href="#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td></td></tr>
113 <p>This section contains the declaration of Windows FNT specific functions.</p>
115 <div class="section">
116 <h3 id="FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</h3>
117 <p>Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).</p>
119 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1252">FT_WinFNT_ID_CP1252</a> 0
120 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_DEFAULT">FT_WinFNT_ID_DEFAULT</a> 1
121 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_SYMBOL">FT_WinFNT_ID_SYMBOL</a> 2
122 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_MAC">FT_WinFNT_ID_MAC</a> 77
123 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP932">FT_WinFNT_ID_CP932</a> 128
124 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP949">FT_WinFNT_ID_CP949</a> 129
125 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1361">FT_WinFNT_ID_CP1361</a> 130
126 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP936">FT_WinFNT_ID_CP936</a> 134
127 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP950">FT_WinFNT_ID_CP950</a> 136
128 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1253">FT_WinFNT_ID_CP1253</a> 161
129 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1254">FT_WinFNT_ID_CP1254</a> 162
130 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1258">FT_WinFNT_ID_CP1258</a> 163
131 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1255">FT_WinFNT_ID_CP1255</a> 177
132 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1256">FT_WinFNT_ID_CP1256</a> 178
133 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1257">FT_WinFNT_ID_CP1257</a> 186
134 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1251">FT_WinFNT_ID_CP1251</a> 204
135 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP874">FT_WinFNT_ID_CP874</a> 222
136 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1250">FT_WinFNT_ID_CP1250</a> 238
137 #define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_OEM">FT_WinFNT_ID_OEM</a> 255
140 <p>A list of valid values for the ‘charset’ byte in <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a>. Exact mapping tables for the various cpXXXX encodings (except for cp1361) can be found at <a href="ftp://ftp.unicode.org/Public">ftp://ftp.unicode.org/Public</a> in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.</p>
143 <table class="fields">
144 <tr><td class="val" id="FT_WinFNT_ID_DEFAULT">FT_WinFNT_ID_DEFAULT</td><td class="desc">
145 <p>This is used for font enumeration and font creation as a ‘don't care’ value. Valid font files don't contain this value. When querying for information about the character set of the font that is currently selected into a specified device context, this return value (of the related Windows API) simply denotes failure.</p>
147 <tr><td class="val" id="FT_WinFNT_ID_SYMBOL">FT_WinFNT_ID_SYMBOL</td><td class="desc">
148 <p>There is no known mapping table available.</p>
150 <tr><td class="val" id="FT_WinFNT_ID_MAC">FT_WinFNT_ID_MAC</td><td class="desc">
151 <p>Mac Roman encoding.</p>
153 <tr><td class="val" id="FT_WinFNT_ID_OEM">FT_WinFNT_ID_OEM</td><td class="desc">
154 <p>From Michael Poettgen <michael@poettgen.de>:</p>
155 <p>The ‘Windows Font Mapping’ article says that FT_WinFNT_ID_OEM is used for the charset of vector fonts, like ‘modern.fon’, ‘roman.fon’, and ‘script.fon’ on Windows.</p>
156 <p>The ‘CreateFont’ documentation says: The FT_WinFNT_ID_OEM value specifies a character set that is operating-system dependent.</p>
157 <p>The ‘IFIMETRICS’ documentation from the ‘Windows Driver Development Kit’ says: This font supports an OEM-specific character set. The OEM character set is system dependent.</p>
158 <p>In general OEM, as opposed to ANSI (i.e., cp1252), denotes the second default codepage that most international versions of Windows have. It is one of the OEM codepages from</p>
159 <p><a href="https://msdn.microsoft.com/en-us/goglobal/bb964655">https://msdn.microsoft.com/en-us/goglobal/bb964655</a>,</p>
160 <p>and is used for the ‘DOS boxes’, to support legacy applications. A German Windows version for example usually uses ANSI codepage 1252 and OEM codepage 850.</p>
162 <tr><td class="val" id="FT_WinFNT_ID_CP874">FT_WinFNT_ID_CP874</td><td class="desc">
163 <p>A superset of Thai TIS 620 and ISO 8859-11.</p>
165 <tr><td class="val" id="FT_WinFNT_ID_CP932">FT_WinFNT_ID_CP932</td><td class="desc">
166 <p>A superset of Japanese Shift-JIS (with minor deviations).</p>
168 <tr><td class="val" id="FT_WinFNT_ID_CP936">FT_WinFNT_ID_CP936</td><td class="desc">
169 <p>A superset of simplified Chinese GB 2312-1980 (with different ordering and minor deviations).</p>
171 <tr><td class="val" id="FT_WinFNT_ID_CP949">FT_WinFNT_ID_CP949</td><td class="desc">
172 <p>A superset of Korean Hangul KS C 5601-1987 (with different ordering and minor deviations).</p>
174 <tr><td class="val" id="FT_WinFNT_ID_CP950">FT_WinFNT_ID_CP950</td><td class="desc">
175 <p>A superset of traditional Chinese Big 5 ETen (with different ordering and minor deviations).</p>
177 <tr><td class="val" id="FT_WinFNT_ID_CP1250">FT_WinFNT_ID_CP1250</td><td class="desc">
178 <p>A superset of East European ISO 8859-2 (with slightly different ordering).</p>
180 <tr><td class="val" id="FT_WinFNT_ID_CP1251">FT_WinFNT_ID_CP1251</td><td class="desc">
181 <p>A superset of Russian ISO 8859-5 (with different ordering).</p>
183 <tr><td class="val" id="FT_WinFNT_ID_CP1252">FT_WinFNT_ID_CP1252</td><td class="desc">
184 <p>ANSI encoding. A superset of ISO 8859-1.</p>
186 <tr><td class="val" id="FT_WinFNT_ID_CP1253">FT_WinFNT_ID_CP1253</td><td class="desc">
187 <p>A superset of Greek ISO 8859-7 (with minor modifications).</p>
189 <tr><td class="val" id="FT_WinFNT_ID_CP1254">FT_WinFNT_ID_CP1254</td><td class="desc">
190 <p>A superset of Turkish ISO 8859-9.</p>
192 <tr><td class="val" id="FT_WinFNT_ID_CP1255">FT_WinFNT_ID_CP1255</td><td class="desc">
193 <p>A superset of Hebrew ISO 8859-8 (with some modifications).</p>
195 <tr><td class="val" id="FT_WinFNT_ID_CP1256">FT_WinFNT_ID_CP1256</td><td class="desc">
196 <p>A superset of Arabic ISO 8859-6 (with different ordering).</p>
198 <tr><td class="val" id="FT_WinFNT_ID_CP1257">FT_WinFNT_ID_CP1257</td><td class="desc">
199 <p>A superset of Baltic ISO 8859-13 (with some deviations).</p>
201 <tr><td class="val" id="FT_WinFNT_ID_CP1258">FT_WinFNT_ID_CP1258</td><td class="desc">
202 <p>For Vietnamese. This encoding doesn't cover all necessary characters.</p>
204 <tr><td class="val" id="FT_WinFNT_ID_CP1361">FT_WinFNT_ID_CP1361</td><td class="desc">
205 <p>Korean (Johab).</p>
210 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
212 <div class="section">
213 <h3 id="FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</h3>
214 <p>Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).</p>
216 <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_WinFNT_HeaderRec_
218 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> version;
219 <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> file_size;
220 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> copyright[60];
221 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> file_type;
222 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> nominal_point_size;
223 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> vertical_resolution;
224 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> horizontal_resolution;
225 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> ascent;
226 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> internal_leading;
227 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> external_leading;
228 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> italic;
229 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> underline;
230 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> strike_out;
231 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> weight;
232 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> charset;
233 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> pixel_width;
234 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> pixel_height;
235 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> pitch_and_family;
236 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> avg_width;
237 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> max_width;
238 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> first_char;
239 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> last_char;
240 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> default_char;
241 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> break_char;
242 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> bytes_per_row;
243 <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> device_offset;
244 <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> face_name_offset;
245 <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> bits_pointer;
246 <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> bits_offset;
247 <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> reserved;
248 <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> flags;
249 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> A_space;
250 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> B_space;
251 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> C_space;
252 <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> color_table_offset;
253 <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> reserved1[4];
255 } <b>FT_WinFNT_HeaderRec</b>;
258 <p>Windows FNT Header info.</p>
261 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
263 <div class="section">
264 <h3 id="FT_WinFNT_Header">FT_WinFNT_Header</h3>
265 <p>Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).</p>
267 <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_WinFNT_HeaderRec_* <b>FT_WinFNT_Header</b>;
270 <p>A handle to an <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a> structure.</p>
273 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
275 <div class="section">
276 <h3 id="FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</h3>
277 <p>Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).</p>
279 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
280 <b>FT_Get_WinFNT_Header</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
281 <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a> *aheader );
284 <p>Retrieve a Windows FNT font info header.</p>
287 <table class="fields">
288 <tr><td class="val" id="face">face</td><td class="desc">
289 <p>A handle to the input face.</p>
294 <table class="fields">
295 <tr><td class="val" id="aheader">aheader</td><td class="desc">
296 <p>The WinFNT header.</p>
301 <p>FreeType error code. 0 means success.</p>
304 <p>This function only works with Windows FNT faces, returning an error otherwise.</p>
307 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>