Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
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 2003, 2004, 2008 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 
19 #ifndef __FTWINFNT_H__
20 #define __FTWINFNT_H__
21 
22 #include <ft2build.h>
23 #include FT_FREETYPE_H
24 
25 #ifdef FREETYPE_H
26 #error "freetype.h of FreeType 1 has been loaded!"
27 #error "Please fix the directory search order for header files"
28 #error "so that freetype.h of FreeType 2 is found first."
29 #endif
30 
31 
33 
34 
35  /*************************************************************************/
36  /* */
37  /* <Section> */
38  /* winfnt_fonts */
39  /* */
40  /* <Title> */
41  /* Window FNT Files */
42  /* */
43  /* <Abstract> */
44  /* Windows FNT specific API. */
45  /* */
46  /* <Description> */
47  /* This section contains the declaration of Windows FNT specific */
48  /* functions. */
49  /* */
50  /*************************************************************************/
51 
52 
53  /*************************************************************************
54  *
55  * @enum:
56  * FT_WinFNT_ID_XXX
57  *
58  * @description:
59  * A list of valid values for the `charset' byte in
60  * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
61  * encodings (except for cp1361) can be found at ftp://ftp.unicode.org
62  * in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is
63  * roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
64  *
65  * @values:
66  * FT_WinFNT_ID_DEFAULT ::
67  * This is used for font enumeration and font creation as a
68  * `don't care' value. Valid font files don't contain this value.
69  * When querying for information about the character set of the font
70  * that is currently selected into a specified device context, this
71  * return value (of the related Windows API) simply denotes failure.
72  *
73  * FT_WinFNT_ID_SYMBOL ::
74  * There is no known mapping table available.
75  *
76  * FT_WinFNT_ID_MAC ::
77  * Mac Roman encoding.
78  *
79  * FT_WinFNT_ID_OEM ::
80  * From Michael Pöttgen <michael@poettgen.de>:
81  *
82  * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
83  * is used for the charset of vector fonts, like `modern.fon',
84  * `roman.fon', and `script.fon' on Windows.
85  *
86  * The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value
87  * specifies a character set that is operating-system dependent.
88  *
89  * The `IFIMETRICS' documentation from the `Windows Driver
90  * Development Kit' says: This font supports an OEM-specific
91  * character set. The OEM character set is system dependent.
92  *
93  * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the
94  * second default codepage that most international versions of
95  * Windows have. It is one of the OEM codepages from
96  *
97  * http://www.microsoft.com/globaldev/reference/cphome.mspx,
98  *
99  * and is used for the `DOS boxes', to support legacy applications.
100  * A German Windows version for example usually uses ANSI codepage
101  * 1252 and OEM codepage 850.
102  *
103  * FT_WinFNT_ID_CP874 ::
104  * A superset of Thai TIS 620 and ISO 8859-11.
105  *
106  * FT_WinFNT_ID_CP932 ::
107  * A superset of Japanese Shift-JIS (with minor deviations).
108  *
109  * FT_WinFNT_ID_CP936 ::
110  * A superset of simplified Chinese GB 2312-1980 (with different
111  * ordering and minor deviations).
112  *
113  * FT_WinFNT_ID_CP949 ::
114  * A superset of Korean Hangul KS~C 5601-1987 (with different
115  * ordering and minor deviations).
116  *
117  * FT_WinFNT_ID_CP950 ::
118  * A superset of traditional Chinese Big~5 ETen (with different
119  * ordering and minor deviations).
120  *
121  * FT_WinFNT_ID_CP1250 ::
122  * A superset of East European ISO 8859-2 (with slightly different
123  * ordering).
124  *
125  * FT_WinFNT_ID_CP1251 ::
126  * A superset of Russian ISO 8859-5 (with different ordering).
127  *
128  * FT_WinFNT_ID_CP1252 ::
129  * ANSI encoding. A superset of ISO 8859-1.
130  *
131  * FT_WinFNT_ID_CP1253 ::
132  * A superset of Greek ISO 8859-7 (with minor modifications).
133  *
134  * FT_WinFNT_ID_CP1254 ::
135  * A superset of Turkish ISO 8859-9.
136  *
137  * FT_WinFNT_ID_CP1255 ::
138  * A superset of Hebrew ISO 8859-8 (with some modifications).
139  *
140  * FT_WinFNT_ID_CP1256 ::
141  * A superset of Arabic ISO 8859-6 (with different ordering).
142  *
143  * FT_WinFNT_ID_CP1257 ::
144  * A superset of Baltic ISO 8859-13 (with some deviations).
145  *
146  * FT_WinFNT_ID_CP1258 ::
147  * For Vietnamese. This encoding doesn't cover all necessary
148  * characters.
149  *
150  * FT_WinFNT_ID_CP1361 ::
151  * Korean (Johab).
152  */
153 
154 #define FT_WinFNT_ID_CP1252 0
155 #define FT_WinFNT_ID_DEFAULT 1
156 #define FT_WinFNT_ID_SYMBOL 2
157 #define FT_WinFNT_ID_MAC 77
158 #define FT_WinFNT_ID_CP932 128
159 #define FT_WinFNT_ID_CP949 129
160 #define FT_WinFNT_ID_CP1361 130
161 #define FT_WinFNT_ID_CP936 134
162 #define FT_WinFNT_ID_CP950 136
163 #define FT_WinFNT_ID_CP1253 161
164 #define FT_WinFNT_ID_CP1254 162
165 #define FT_WinFNT_ID_CP1258 163
166 #define FT_WinFNT_ID_CP1255 177
167 #define FT_WinFNT_ID_CP1256 178
168 #define FT_WinFNT_ID_CP1257 186
169 #define FT_WinFNT_ID_CP1251 204
170 #define FT_WinFNT_ID_CP874 222
171 #define FT_WinFNT_ID_CP1250 238
172 #define FT_WinFNT_ID_OEM 255
173 
174 
175  /*************************************************************************/
176  /* */
177  /* <Struct> */
178  /* FT_WinFNT_HeaderRec */
179  /* */
180  /* <Description> */
181  /* Windows FNT Header info. */
182  /* */
183  typedef struct FT_WinFNT_HeaderRec_
184  {
221 
223 
224 
225  /*************************************************************************/
226  /* */
227  /* <Struct> */
228  /* FT_WinFNT_Header */
229  /* */
230  /* <Description> */
231  /* A handle to an @FT_WinFNT_HeaderRec structure. */
232  /* */
234 
235 
236  /**********************************************************************
237  *
238  * @function:
239  * FT_Get_WinFNT_Header
240  *
241  * @description:
242  * Retrieve a Windows FNT font info header.
243  *
244  * @input:
245  * face :: A handle to the input face.
246  *
247  * @output:
248  * aheader :: The WinFNT header.
249  *
250  * @return:
251  * FreeType error code. 0~means success.
252  *
253  * @note:
254  * This function only works with Windows FNT faces, returning an error
255  * otherwise.
256  */
259  FT_WinFNT_HeaderRec *aheader );
260 
261 
262  /* */
263 
265 
266 #endif /* __FTWINFNT_H__ */
267 
268 
269 /* END */
270 
271 
272 /* Local Variables: */
273 /* coding: utf-8 */
274 /* End: */
FT_UShort max_width
Definition: ftwinfnt.h:204
FT_ULong face_name_offset
Definition: ftwinfnt.h:211
FT_Byte default_char
Definition: ftwinfnt.h:207
int FT_Error
Definition: fttypes.h:296
struct FT_WinFNT_HeaderRec_ * FT_WinFNT_Header
Definition: ftwinfnt.h:233
unsigned long FT_ULong
Definition: fttypes.h:249
FT_ULong reserved1[4]
Definition: ftwinfnt.h:220
FT_ULong bits_pointer
Definition: ftwinfnt.h:212
FT_Get_WinFNT_Header(FT_Face face, FT_WinFNT_HeaderRec *aheader)
Definition: ftwinfnt.c:28
FT_UShort color_table_offset
Definition: ftwinfnt.h:219
#define FT_END_HEADER
Definition: ftheader.h:54
FT_ULong bits_offset
Definition: ftwinfnt.h:213
FT_UShort file_type
Definition: ftwinfnt.h:188
FT_ULong device_offset
Definition: ftwinfnt.h:210
FT_UShort B_space
Definition: ftwinfnt.h:217
FT_UShort bytes_per_row
Definition: ftwinfnt.h:209
GLenum GLuint GLint GLenum face
unsigned char FT_Byte
Definition: fttypes.h:150
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
FT_UShort internal_leading
Definition: ftwinfnt.h:193
FT_UShort ascent
Definition: ftwinfnt.h:192
FT_UShort weight
Definition: ftwinfnt.h:198
FT_UShort version
Definition: ftwinfnt.h:185
FT_Byte pitch_and_family
Definition: ftwinfnt.h:202
struct FT_WinFNT_HeaderRec_ FT_WinFNT_HeaderRec
FT_UShort nominal_point_size
Definition: ftwinfnt.h:189
FT_UShort vertical_resolution
Definition: ftwinfnt.h:190
FT_UShort C_space
Definition: ftwinfnt.h:218
FT_UShort horizontal_resolution
Definition: ftwinfnt.h:191
#define FT_EXPORT(x)
Definition: ftconfig.h:269
FT_UShort external_leading
Definition: ftwinfnt.h:194
FT_UShort avg_width
Definition: ftwinfnt.h:203
FT_UShort A_space
Definition: ftwinfnt.h:216
FT_UShort pixel_width
Definition: ftwinfnt.h:200
unsigned short FT_UShort
Definition: fttypes.h:205
FT_ULong file_size
Definition: ftwinfnt.h:186
FT_Byte copyright[60]
Definition: ftwinfnt.h:187
FT_UShort pixel_height
Definition: ftwinfnt.h:201