xref: /inferno-os/include/freetype/internal/fnttypes.h (revision 37da2899f40661e3e9631e497da8dc59b971cbd0)
1 /***************************************************************************/
2 /*                                                                         */
3 /*  fnttypes.h                                                             */
4 /*                                                                         */
5 /*    Basic Windows FNT/FON type definitions and interface (specification  */
6 /*    only).                                                               */
7 /*                                                                         */
8 /*  Copyright 1996-2001, 2002 by                                           */
9 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
10 /*                                                                         */
11 /*  This file is part of the FreeType project, and may only be used,       */
12 /*  modified, and distributed under the terms of the FreeType project      */
13 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
14 /*  this file you indicate that you have read the license and              */
15 /*  understand and accept it fully.                                        */
16 /*                                                                         */
17 /***************************************************************************/
18 
19 
20 #ifndef __FNTTYPES_H__
21 #define __FNTTYPES_H__
22 
23 
24 #include <ft2build.h>
25 #include FT_FREETYPE_H
26 
27 
28 FT_BEGIN_HEADER
29 
30 
31   typedef struct  WinMZ_HeaderRec_
32   {
33     FT_UShort  magic;
34     /* skipped content */
35     FT_UShort  lfanew;
36 
37   } WinMZ_HeaderRec;
38 
39 
40   typedef struct  WinNE_HeaderRec_
41   {
42     FT_UShort  magic;
43     /* skipped content */
44     FT_UShort  resource_tab_offset;
45     FT_UShort  rname_tab_offset;
46 
47   } WinNE_HeaderRec;
48 
49 
50   typedef struct  WinNameInfoRec_
51   {
52     FT_UShort  offset;
53     FT_UShort  length;
54     FT_UShort  flags;
55     FT_UShort  id;
56     FT_UShort  handle;
57     FT_UShort  usage;
58 
59   } WinNameInfoRec;
60 
61 
62   typedef struct  WinResourceInfoRec_
63   {
64     FT_UShort  type_id;
65     FT_UShort  count;
66 
67   } WinResourceInfoRec;
68 
69 
70 #define WINFNT_MZ_MAGIC  0x5A4D
71 #define WINFNT_NE_MAGIC  0x454E
72 
73 
74   typedef struct  WinFNT_HeaderRec_
75   {
76     FT_UShort  version;
77     FT_ULong   file_size;
78     FT_Byte    copyright[60];
79     FT_UShort  file_type;
80     FT_UShort  nominal_point_size;
81     FT_UShort  vertical_resolution;
82     FT_UShort  horizontal_resolution;
83     FT_UShort  ascent;
84     FT_UShort  internal_leading;
85     FT_UShort  external_leading;
86     FT_Byte    italic;
87     FT_Byte    underline;
88     FT_Byte    strike_out;
89     FT_UShort  weight;
90     FT_Byte    charset;
91     FT_UShort  pixel_width;
92     FT_UShort  pixel_height;
93     FT_Byte    pitch_and_family;
94     FT_UShort  avg_width;
95     FT_UShort  max_width;
96     FT_Byte    first_char;
97     FT_Byte    last_char;
98     FT_Byte    default_char;
99     FT_Byte    break_char;
100     FT_UShort  bytes_per_row;
101     FT_ULong   device_offset;
102     FT_ULong   face_name_offset;
103     FT_ULong   bits_pointer;
104     FT_ULong   bits_offset;
105     FT_Byte    reserved;
106     FT_ULong   flags;
107     FT_UShort  A_space;
108     FT_UShort  B_space;
109     FT_UShort  C_space;
110     FT_UShort  color_table_offset;
111     FT_Byte    reserved2[4];
112 
113   } WinFNT_HeaderRec, *WinFNT_Header;
114 
115 
116   typedef struct  FNT_FontRec_
117   {
118     FT_ULong          offset;
119     FT_Int            size_shift;
120 
121     WinFNT_HeaderRec  header;
122 
123     FT_Byte*          fnt_frame;
124     FT_ULong          fnt_size;
125 
126   } FNT_FontRec, *FNT_Font;
127 
128 
129   typedef struct  FNT_SizeRec_
130   {
131     FT_SizeRec  root;
132     FNT_Font    font;
133 
134   } FNT_SizeRec, *FNT_Size;
135 
136 
137   typedef struct  FNT_FaceRec_
138   {
139     FT_FaceRec     root;
140 
141     FT_UInt        num_fonts;
142     FNT_Font       fonts;
143 
144     FT_CharMap     charmap_handle;
145     FT_CharMapRec  charmap;  /* a single charmap per face */
146 
147   } FNT_FaceRec, *FNT_Face;
148 
149 
150 FT_END_HEADER
151 
152 #endif /* __FNTTYPES_H__ */
153 
154 
155 /* END */
156