sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
ftwinfnt.h
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* ftwinfnt.h
4
*
5
* FreeType API for accessing Windows fnt-specific data.
6
*
7
* Copyright (C) 2003-2025 by
8
* David Turner, Robert Wilhelm, and Werner Lemberg.
9
*
10
* This file is part of the FreeType project, and may only be used,
11
* modified, and distributed under the terms of the FreeType project
12
* license, LICENSE.TXT. By continuing to use, modify, or distribute
13
* this file you indicate that you have read the license and
14
* understand and accept it fully.
15
*
16
*/
17
18
23
#ifndef FTWINFNT_H_
24
#define FTWINFNT_H_
25
26
#include <
freetype/freetype.h
>
27
28
#ifdef FREETYPE_H
29
#error "freetype.h of FreeType 1 has been loaded!"
30
#error "Please fix the directory search order for header files"
31
#error "so that freetype.h of FreeType 2 is found first."
32
#endif
33
34
35
FT_BEGIN_HEADER
36
37
38
/**************************************************************************
39
*
40
* @section:
41
* winfnt_fonts
42
*
43
* @title:
44
* Window FNT Files
45
*
46
* @abstract:
47
* Windows FNT-specific API.
48
*
49
* @description:
50
* This section contains the declaration of Windows FNT-specific
51
* functions.
52
*
53
*/
54
55
56
/**************************************************************************
57
*
58
* @enum:
59
* FT_WinFNT_ID_XXX
60
*
61
* @description:
62
* A list of valid values for the `charset` byte in @FT_WinFNT_HeaderRec.
63
* Exact mapping tables for the various 'cpXXXX' encodings (except for
64
* 'cp1361') can be found at 'ftp://ftp.unicode.org/Public/' in the
65
* `MAPPINGS/VENDORS/MICSFT/WINDOWS` subdirectory. 'cp1361' is roughly a
66
* superset of `MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT`.
67
*
68
* @values:
69
* FT_WinFNT_ID_DEFAULT ::
70
* This is used for font enumeration and font creation as a 'don't
71
* care' value. Valid font files don't contain this value. When
72
* querying for information about the character set of the font that is
73
* currently selected into a specified device context, this return
74
* value (of the related Windows API) simply denotes failure.
75
*
76
* FT_WinFNT_ID_SYMBOL ::
77
* There is no known mapping table available.
78
*
79
* FT_WinFNT_ID_MAC ::
80
* Mac Roman encoding.
81
*
82
* FT_WinFNT_ID_OEM ::
83
* From Michael Poettgen <michael@poettgen.de>:
84
*
85
* The 'Windows Font Mapping' article says that `FT_WinFNT_ID_OEM` is
86
* used for the charset of vector fonts, like `modern.fon`,
87
* `roman.fon`, and `script.fon` on Windows.
88
*
89
* The 'CreateFont' documentation says: The `FT_WinFNT_ID_OEM` value
90
* specifies a character set that is operating-system dependent.
91
*
92
* The 'IFIMETRICS' documentation from the 'Windows Driver Development
93
* Kit' says: This font supports an OEM-specific character set. The
94
* OEM character set is system dependent.
95
*
96
* In general OEM, as opposed to ANSI (i.e., 'cp1252'), denotes the
97
* second default codepage that most international versions of Windows
98
* have. It is one of the OEM codepages from
99
*
100
* https://learn.microsoft.com/windows/win32/intl/code-page-identifiers ,
101
*
102
* and is used for the 'DOS boxes', to support legacy applications. A
103
* German Windows version for example usually uses ANSI codepage 1252
104
* and OEM codepage 850.
105
*
106
* FT_WinFNT_ID_CP874 ::
107
* A superset of Thai TIS 620 and ISO 8859-11.
108
*
109
* FT_WinFNT_ID_CP932 ::
110
* A superset of Japanese Shift-JIS (with minor deviations).
111
*
112
* FT_WinFNT_ID_CP936 ::
113
* A superset of simplified Chinese GB 2312-1980 (with different
114
* ordering and minor deviations).
115
*
116
* FT_WinFNT_ID_CP949 ::
117
* A superset of Korean Hangul KS~C 5601-1987 (with different ordering
118
* and minor deviations).
119
*
120
* FT_WinFNT_ID_CP950 ::
121
* A superset of traditional Chinese Big~5 ETen (with different
122
* ordering and minor deviations).
123
*
124
* FT_WinFNT_ID_CP1250 ::
125
* A superset of East European ISO 8859-2 (with slightly different
126
* ordering).
127
*
128
* FT_WinFNT_ID_CP1251 ::
129
* A superset of Russian ISO 8859-5 (with different ordering).
130
*
131
* FT_WinFNT_ID_CP1252 ::
132
* ANSI encoding. A superset of ISO 8859-1.
133
*
134
* FT_WinFNT_ID_CP1253 ::
135
* A superset of Greek ISO 8859-7 (with minor modifications).
136
*
137
* FT_WinFNT_ID_CP1254 ::
138
* A superset of Turkish ISO 8859-9.
139
*
140
* FT_WinFNT_ID_CP1255 ::
141
* A superset of Hebrew ISO 8859-8 (with some modifications).
142
*
143
* FT_WinFNT_ID_CP1256 ::
144
* A superset of Arabic ISO 8859-6 (with different ordering).
145
*
146
* FT_WinFNT_ID_CP1257 ::
147
* A superset of Baltic ISO 8859-13 (with some deviations).
148
*
149
* FT_WinFNT_ID_CP1258 ::
150
* For Vietnamese. This encoding doesn't cover all necessary
151
* characters.
152
*
153
* FT_WinFNT_ID_CP1361 ::
154
* Korean (Johab).
155
*/
156
157
#define FT_WinFNT_ID_CP1252 0
158
#define FT_WinFNT_ID_DEFAULT 1
159
#define FT_WinFNT_ID_SYMBOL 2
160
#define FT_WinFNT_ID_MAC 77
161
#define FT_WinFNT_ID_CP932 128
162
#define FT_WinFNT_ID_CP949 129
163
#define FT_WinFNT_ID_CP1361 130
164
#define FT_WinFNT_ID_CP936 134
165
#define FT_WinFNT_ID_CP950 136
166
#define FT_WinFNT_ID_CP1253 161
167
#define FT_WinFNT_ID_CP1254 162
168
#define FT_WinFNT_ID_CP1258 163
169
#define FT_WinFNT_ID_CP1255 177
170
#define FT_WinFNT_ID_CP1256 178
171
#define FT_WinFNT_ID_CP1257 186
172
#define FT_WinFNT_ID_CP1251 204
173
#define FT_WinFNT_ID_CP874 222
174
#define FT_WinFNT_ID_CP1250 238
175
#define FT_WinFNT_ID_OEM 255
176
177
178
/**************************************************************************
179
*
180
* @struct:
181
* FT_WinFNT_HeaderRec
182
*
183
* @description:
184
* Windows FNT Header info.
185
*/
186
typedef
struct
FT_WinFNT_HeaderRec_
187
{
188
FT_UShort version;
189
FT_ULong file_size;
190
FT_Byte copyright[60];
191
FT_UShort file_type;
192
FT_UShort nominal_point_size;
193
FT_UShort vertical_resolution;
194
FT_UShort horizontal_resolution;
195
FT_UShort ascent;
196
FT_UShort internal_leading;
197
FT_UShort external_leading;
198
FT_Byte italic;
199
FT_Byte underline;
200
FT_Byte strike_out;
201
FT_UShort weight;
202
FT_Byte charset;
203
FT_UShort pixel_width;
204
FT_UShort pixel_height;
205
FT_Byte pitch_and_family;
206
FT_UShort avg_width;
207
FT_UShort max_width;
208
FT_Byte first_char;
209
FT_Byte last_char;
210
FT_Byte default_char;
211
FT_Byte break_char;
212
FT_UShort bytes_per_row;
213
FT_ULong device_offset;
214
FT_ULong face_name_offset;
215
FT_ULong bits_pointer;
216
FT_ULong bits_offset;
217
FT_Byte reserved;
218
FT_ULong flags;
219
FT_UShort A_space;
220
FT_UShort B_space;
221
FT_UShort C_space;
222
FT_UShort color_table_offset;
223
FT_ULong reserved1[4];
224
225
} FT_WinFNT_HeaderRec;
226
227
228
/**************************************************************************
229
*
230
* @struct:
231
* FT_WinFNT_Header
232
*
233
* @description:
234
* A handle to an @FT_WinFNT_HeaderRec structure.
235
*/
236
typedef
struct
FT_WinFNT_HeaderRec_
* FT_WinFNT_Header;
237
238
239
/**************************************************************************
240
*
241
* @function:
242
* FT_Get_WinFNT_Header
243
*
244
* @description:
245
* Retrieve a Windows FNT font info header.
246
*
247
* @input:
248
* face ::
249
* A handle to the input face.
250
*
251
* @output:
252
* aheader ::
253
* The WinFNT header.
254
*
255
* @return:
256
* FreeType error code. 0~means success.
257
*
258
* @note:
259
* This function only works with Windows FNT faces, returning an error
260
* otherwise.
261
*/
262
FT_EXPORT( FT_Error )
263
FT_Get_WinFNT_Header( FT_Face face,
264
FT_WinFNT_HeaderRec *aheader );
265
266
/* */
267
268
269
FT_END_HEADER
270
271
#endif
/* FTWINFNT_H_ */
272
273
274
/* END */
275
276
277
/* Local Variables: */
278
/* coding: utf-8 */
279
/* End: */
freetype.h
FT_WinFNT_HeaderRec_
Definition
ftwinfnt.h:187
freetype
include
freetype
ftwinfnt.h
Generated by
1.18.0