f058df8a3a5ec720c3c602fcb59ff8cb2083863c
[platform/upstream/freetype2.git] / docs / reference / ft2-winfnt_fonts.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "https://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.9 API Reference</title>
7 <style type="text/css">
8   a:link { color: #0000EF; }
9   a:visited { color: #51188E; }
10   a:hover { color: #FF0000; }
11
12   body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
13          color: #000000;
14          background: #FFFFFF;
15          width: 87%;
16          margin: auto; }
17
18   div.section { width: 75%;
19                 margin: auto; }
20   div.section hr { margin: 4ex 0 1ex 0; }
21   div.section h4 { background-color: #EEEEFF;
22                    font-size: medium;
23                    font-style: oblique;
24                    font-weight: bold;
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;
36                   font-size: 69%;
37                   margin: 1.5ex 0 1.5ex 0; }
38
39   h1 { text-align: center; }
40   h3 { font-size: medium;
41        margin: 4ex 0 1.5ex 0; }
42
43   p { text-align: justify; }
44
45   pre.colored { color: blue; }
46
47   span.keyword { font-family: monospace;
48                  text-align: left;
49                  white-space: pre;
50                  color: darkblue; }
51
52   table.fields td.val { font-weight: bold;
53                         text-align: right;
54                         width: 30%;
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;
62                 border: 0;
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%;
68                          border: 0;
69                          border-spacing: 0;
70                          margin: 1ex 0 1ex 0; }
71   table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
72                                  font-size: 83%;
73                                  text-align: left; }
74   table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
75                                    font-size: 83%;
76                                    text-align: center; }
77   table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
78                                   font-size: 83%;
79                                   text-align: right; }
80   table.synopsis { margin: 6ex auto 6ex auto;
81                    border: 0;
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%;
87                       text-align: right;
88                       vertical-align: baseline;
89                       padding: 1ex 1em 1ex 0; }
90   table.toc td.desc { vertical-align: baseline;
91                       padding: 1ex 0 1ex 1em;
92                       text-align: left; }
93   table.toc td.desc p:first-child { margin: 0;
94                                     text-align: left; }
95   table.toc td.desc p { margin: 1.5ex 0 0 0;
96                         text-align: left; }
97
98 </style>
99 </head>
100 <body>
101
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>
104
105 <h1 id="winfnt_fonts">Window FNT Files</h1>
106 <h2>Synopsis</h2>
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>
110 </table>
111
112
113 <p>This section contains the declaration of Windows FNT specific functions.</p>
114
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>
118 <pre>
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
138 </pre>
139
140 <p>A list of valid values for the &lsquo;charset&rsquo; 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>
141
142 <h4>values</h4>
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 &lsquo;don't care&rsquo; 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>
146 </td></tr>
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>
149 </td></tr>
150 <tr><td class="val" id="FT_WinFNT_ID_MAC">FT_WinFNT_ID_MAC</td><td class="desc">
151 <p>Mac Roman encoding.</p>
152 </td></tr>
153 <tr><td class="val" id="FT_WinFNT_ID_OEM">FT_WinFNT_ID_OEM</td><td class="desc">
154 <p>From Michael Poettgen &lt;michael@poettgen.de&gt;:</p>
155 <p>The &lsquo;Windows Font Mapping&rsquo; article says that FT_WinFNT_ID_OEM is used for the charset of vector fonts, like &lsquo;modern.fon&rsquo;, &lsquo;roman.fon&rsquo;, and &lsquo;script.fon&rsquo; on Windows.</p>
156 <p>The &lsquo;CreateFont&rsquo; documentation says: The FT_WinFNT_ID_OEM value specifies a character set that is operating-system dependent.</p>
157 <p>The &lsquo;IFIMETRICS&rsquo; documentation from the &lsquo;Windows Driver Development Kit&rsquo; 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 &lsquo;DOS boxes&rsquo;, to support legacy applications. A German Windows version for example usually uses ANSI codepage 1252 and OEM codepage 850.</p>
161 </td></tr>
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>
164 </td></tr>
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>
167 </td></tr>
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>
170 </td></tr>
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&nbsp;C 5601-1987 (with different ordering and minor deviations).</p>
173 </td></tr>
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&nbsp;5 ETen (with different ordering and minor deviations).</p>
176 </td></tr>
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>
179 </td></tr>
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>
182 </td></tr>
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>
185 </td></tr>
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>
188 </td></tr>
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>
191 </td></tr>
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>
194 </td></tr>
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>
197 </td></tr>
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>
200 </td></tr>
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>
203 </td></tr>
204 <tr><td class="val" id="FT_WinFNT_ID_CP1361">FT_WinFNT_ID_CP1361</td><td class="desc">
205 <p>Korean (Johab).</p>
206 </td></tr>
207 </table>
208
209 <hr>
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>
211
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>
215 <pre>
216   <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_WinFNT_HeaderRec_
217   {
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];
254
255   } <b>FT_WinFNT_HeaderRec</b>;
256 </pre>
257
258 <p>Windows FNT Header info.</p>
259
260 <hr>
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>
262
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>
266 <pre>
267   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_WinFNT_HeaderRec_*  <b>FT_WinFNT_Header</b>;
268 </pre>
269
270 <p>A handle to an <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a> structure.</p>
271
272 <hr>
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>
274
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>
278 <pre>
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 );
282 </pre>
283
284 <p>Retrieve a Windows FNT font info header.</p>
285
286 <h4>input</h4>
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>
290 </td></tr>
291 </table>
292
293 <h4>output</h4>
294 <table class="fields">
295 <tr><td class="val" id="aheader">aheader</td><td class="desc">
296 <p>The WinFNT header.</p>
297 </td></tr>
298 </table>
299
300 <h4>return</h4>
301 <p>FreeType error code. 0&nbsp;means success.</p>
302
303 <h4>note</h4>
304 <p>This function only works with Windows FNT faces, returning an error otherwise.</p>
305
306 <hr>
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>
308
309 </body>
310 </html>