source: OGRE/trunk/ogrenew/Dependencies/include/freetype/ftwinfnt.h @ 657

Revision 657, 9.7 KB checked in by mattausch, 18 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1/***************************************************************************/
2/*                                                                         */
3/*  ftwinfnt.h                                                             */
4/*                                                                         */
5/*    FreeType API for accessing Windows fnt-specific data.                */
6/*                                                                         */
7/*  Copyright 2003, 2004 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
32FT_BEGIN_HEADER
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   *       The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
82   *       is used for the charset of vector fonts, like `modern.fon',
83   *       `roman.fon', and `script.fon' on Windows.
84   *
85   *       The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value
86   *       specifies a character set that is operating-system dependent.
87   *
88   *       The `IFIMETRICS' documentation from the `Windows Driver
89   *       Development Kit' says: This font supports an OEM-specific
90   *       character set.  The OEM character set is system dependent.
91   *
92   *       In general OEM, as opposed to ANSI (i.e., cp1252), denotes the
93   *       second default codepage that most international versions of
94   *       Windows have.  It is one of the OEM codepages from
95   *
96   *         http://www.microsoft.com/globaldev/reference/cphome.mspx,
97   *   
98   *       and is used for the `DOS boxes', to support legacy applications.
99   *       A German Windows version for example usually uses ANSI codepage
100   *       1252 and OEM codepage 850.
101   *
102   *   FT_WinFNT_ID_CP874 ::
103   *     A superset of Thai TIS 620 and ISO 8859-11.
104   *
105   *   FT_WinFNT_ID_CP932 ::
106   *     A superset of Japanese Shift-JIS (with minor deviations).
107   *
108   *   FT_WinFNT_ID_CP936 ::
109   *     A superset of simplified Chinese GB 2312-1980 (with different
110   *     ordering and minor deviations).
111   *
112   *   FT_WinFNT_ID_CP949 ::
113   *     A superset of Korean Hangul KS C 5601-1987 (with different
114   *     ordering and minor deviations).
115   *
116   *   FT_WinFNT_ID_CP950 ::
117   *     A superset of traditional Chinese Big 5 ETen (with different
118   *     ordering and minor deviations).
119   *
120   *   FT_WinFNT_ID_CP1250 ::
121   *     A superset of East European ISO 8859-2 (with slightly different
122   *     ordering).
123   *
124   *   FT_WinFNT_ID_CP1251 ::
125   *     A superset of Russian ISO 8859-5 (with different ordering).
126   *
127   *   FT_WinFNT_ID_CP1252 ::
128   *     ANSI encoding.  A superset of ISO 8859-1.
129   *
130   *   FT_WinFNT_ID_CP1253 ::
131   *     A superset of Greek ISO 8859-7 (with minor modifications).
132   *     
133   *   FT_WinFNT_ID_CP1254 ::
134   *     A superset of Turkish ISO 8859-9.
135   *     
136   *   FT_WinFNT_ID_CP1255 ::
137   *     A superset of Hebrew ISO 8859-8 (with some modifications).
138   *
139   *   FT_WinFNT_ID_CP1256 ::
140   *     A superset of Arabic ISO 8859-6 (with different ordering).
141   *
142   *   FT_WinFNT_ID_CP1257 ::
143   *     A superset of Baltic ISO 8859-13 (with some deviations).
144   *
145   *   FT_WinFNT_ID_CP1258 ::
146   *     For Vietnamese.  This encoding doesn't cover all necessary
147   *     characters.
148   *
149   *   FT_WinFNT_ID_CP1361 ::
150   *     Korean (Johab).
151   */
152
153#define FT_WinFNT_ID_CP1252    0
154#define FT_WinFNT_ID_DEFAULT   1
155#define FT_WinFNT_ID_SYMBOL    2
156#define FT_WinFNT_ID_MAC      77
157#define FT_WinFNT_ID_CP932   128
158#define FT_WinFNT_ID_CP949   129
159#define FT_WinFNT_ID_CP1361  130
160#define FT_WinFNT_ID_CP936   134
161#define FT_WinFNT_ID_CP950   136
162#define FT_WinFNT_ID_CP1253  161
163#define FT_WinFNT_ID_CP1254  162
164#define FT_WinFNT_ID_CP1258  163
165#define FT_WinFNT_ID_CP1255  177
166#define FT_WinFNT_ID_CP1256  178
167#define FT_WinFNT_ID_CP1257  186
168#define FT_WinFNT_ID_CP1251  204
169#define FT_WinFNT_ID_CP874   222
170#define FT_WinFNT_ID_CP1250  238
171#define FT_WinFNT_ID_OEM     255
172
173
174  /*************************************************************************/
175  /*                                                                       */
176  /* <Struct>                                                              */
177  /*    FT_WinFNT_HeaderRec                                                */
178  /*                                                                       */
179  /* <Description>                                                         */
180  /*    Windows FNT Header info.                                           */
181  /*                                                                       */
182  typedef struct  FT_WinFNT_HeaderRec_
183  {
184    FT_UShort  version;
185    FT_ULong   file_size;
186    FT_Byte    copyright[60];
187    FT_UShort  file_type;
188    FT_UShort  nominal_point_size;
189    FT_UShort  vertical_resolution;
190    FT_UShort  horizontal_resolution;
191    FT_UShort  ascent;
192    FT_UShort  internal_leading;
193    FT_UShort  external_leading;
194    FT_Byte    italic;
195    FT_Byte    underline;
196    FT_Byte    strike_out;
197    FT_UShort  weight;
198    FT_Byte    charset;
199    FT_UShort  pixel_width;
200    FT_UShort  pixel_height;
201    FT_Byte    pitch_and_family;
202    FT_UShort  avg_width;
203    FT_UShort  max_width;
204    FT_Byte    first_char;
205    FT_Byte    last_char;
206    FT_Byte    default_char;
207    FT_Byte    break_char;
208    FT_UShort  bytes_per_row;
209    FT_ULong   device_offset;
210    FT_ULong   face_name_offset;
211    FT_ULong   bits_pointer;
212    FT_ULong   bits_offset;
213    FT_Byte    reserved;
214    FT_ULong   flags;
215    FT_UShort  A_space;
216    FT_UShort  B_space;
217    FT_UShort  C_space;
218    FT_UShort  color_table_offset;
219    FT_ULong   reserved1[4];
220
221  } FT_WinFNT_HeaderRec, *FT_WinFNT_Header;
222
223
224 /**********************************************************************
225  *
226  * @function:
227  *    FT_Get_WinFNT_Header
228  *
229  * @description:
230  *    Retrieve a Windows FNT font info header.
231  *
232  * @input:
233  *    face    :: A handle to the input face.
234  *
235  * @output:
236  *    aheader :: The WinFNT header.
237  *
238  * @return:
239  *   FreeType error code.  0 means success.
240  *
241  * @note:
242  *   This function only works with Windows FNT faces, returning an error
243  *   otherwise.
244  */
245  FT_EXPORT( FT_Error )
246  FT_Get_WinFNT_Header( FT_Face               face,
247                        FT_WinFNT_HeaderRec  *aheader );
248
249
250 /* */
251
252FT_END_HEADER
253
254#endif /* __FTWINFNT_H__ */
255
256
257/* END */
Note: See TracBrowser for help on using the repository browser.