]> git.saurik.com Git - wxWidgets.git/blob - src/freetype/freetype/t1tables.h
More contrib compilation fixes & makefiles
[wxWidgets.git] / src / freetype / freetype / t1tables.h
1 /***************************************************************************/
2 /* */
3 /* t1tables.h */
4 /* */
5 /* Basic Type 1/Type 2 tables definitions and interface (specification */
6 /* only). */
7 /* */
8 /* Copyright 1996-2000 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 T1TABLES_H
21 #define T1TABLES_H
22
23
24 #include <freetype/freetype.h>
25
26
27 /* Note that we separate font data in T1_FontInfo and T1_Private */
28 /* structures in order to support Multiple Master fonts. */
29
30
31 /*************************************************************************/
32 /* */
33 /* <Struct> */
34 /* T1_FontInfo */
35 /* */
36 /* <Description> */
37 /* A structure used to model a Type1/Type2 FontInfo dictionary. Note */
38 /* that for Multiple Master fonts, each instance has its own */
39 /* FontInfo. */
40 /* */
41 typedef struct T1_FontInfo
42 {
43 FT_String* version;
44 FT_String* notice;
45 FT_String* full_name;
46 FT_String* family_name;
47 FT_String* weight;
48 FT_Long italic_angle;
49 FT_Bool is_fixed_pitch;
50 FT_Short underline_position;
51 FT_UShort underline_thickness;
52
53 } T1_FontInfo;
54
55
56 /*************************************************************************/
57 /* */
58 /* <Struct> */
59 /* T1_Private */
60 /* */
61 /* <Description> */
62 /* A structure used to model a Type1/Type2 FontInfo dictionary. Note */
63 /* that for Multiple Master fonts, each instance has its own Private */
64 /* dict. */
65 /* */
66 typedef struct T1_Private
67 {
68 FT_Int unique_id;
69 FT_Int lenIV;
70
71 FT_Byte num_blue_values;
72 FT_Byte num_other_blues;
73 FT_Byte num_family_blues;
74 FT_Byte num_family_other_blues;
75
76 FT_Short blue_values[14];
77 FT_Short other_blues[10];
78
79 FT_Short family_blues [14];
80 FT_Short family_other_blues[10];
81
82 FT_Fixed blue_scale;
83 FT_Int blue_shift;
84 FT_Int blue_fuzz;
85
86 FT_UShort standard_width[1];
87 FT_UShort standard_height[1];
88
89 FT_Byte num_snap_widths;
90 FT_Byte num_snap_heights;
91 FT_Bool force_bold;
92 FT_Bool round_stem_up;
93
94 FT_Short snap_widths [13]; /* reserve one place for the std */
95 FT_Short snap_heights[13]; /* reserve one place for the std */
96
97 FT_Long language_group;
98 FT_Long password;
99
100 FT_Short min_feature[2];
101
102 } T1_Private;
103
104
105 /*************************************************************************/
106 /* */
107 /* <Enum> */
108 /* T1_Blend_Flags */
109 /* */
110 /* <Description> */
111 /* A set of flags used to indicate which fields are present in a */
112 /* given blen dictionary (font info or private). Used to support */
113 /* Multiple Masters fonts. */
114 /* */
115 typedef enum
116 {
117 /* required fields in a FontInfo blend dictionary */
118 t1_blend_underline_position = 0,
119 t1_blend_underline_thickness,
120 t1_blend_italic_angle,
121
122 /* required fields in a Private blend dictionary */
123 t1_blend_blue_values,
124 t1_blend_other_blues,
125 t1_blend_standard_width,
126 t1_blend_standard_height,
127 t1_blend_stem_snap_widths,
128 t1_blend_stem_snap_heights,
129 t1_blend_blue_scale,
130 t1_blend_blue_shift,
131 t1_blend_family_blues,
132 t1_blend_family_other_blues,
133 t1_blend_force_bold,
134
135 /* never remove */
136 t1_blend_max
137
138 } T1_Blend_Flags;
139
140
141 /* maximum number of Multiple Masters designs, as defined in the spec */
142 #define T1_MAX_MM_DESIGNS 16
143
144 /* maximum number of Multiple Masters axes, as defined in the spec */
145 #define T1_MAX_MM_AXIS 4
146
147 /* maximum number of elements in a design map */
148 #define T1_MAX_MM_MAP_POINTS 20
149
150
151 /* this structure is used to store the BlendDesignMap entry for an axis */
152 typedef struct T1_DesignMap_
153 {
154 FT_Byte num_points;
155 FT_Fixed* design_points;
156 FT_Fixed* blend_points;
157
158 } T1_DesignMap;
159
160
161 typedef struct T1_Blend_
162 {
163 FT_UInt num_designs;
164 FT_UInt num_axis;
165
166 FT_String* axis_names[T1_MAX_MM_AXIS];
167 FT_Fixed* design_pos[T1_MAX_MM_DESIGNS];
168 T1_DesignMap design_map[T1_MAX_MM_AXIS];
169
170 FT_Fixed* weight_vector;
171 FT_Fixed* default_weight_vector;
172
173 T1_FontInfo* font_infos[T1_MAX_MM_DESIGNS + 1];
174 T1_Private* privates [T1_MAX_MM_DESIGNS + 1];
175
176 FT_ULong blend_bitflags;
177
178 } T1_Blend;
179
180
181 typedef struct CID_FontDict_
182 {
183 T1_Private private_dict;
184
185 FT_UInt len_buildchar;
186 FT_Fixed forcebold_threshold;
187 FT_Pos stroke_width;
188 FT_Fixed expansion_factor;
189
190 FT_Byte paint_type;
191 FT_Byte font_type;
192 FT_Matrix font_matrix;
193
194 FT_UInt num_subrs;
195 FT_ULong subrmap_offset;
196 FT_Int sd_bytes;
197
198 } CID_FontDict;
199
200
201 typedef struct CID_Info_
202 {
203 FT_String* cid_font_name;
204 FT_Fixed cid_version;
205 FT_Int cid_font_type;
206
207 FT_String* registry;
208 FT_String* ordering;
209 FT_Int supplement;
210
211 T1_FontInfo font_info;
212 FT_BBox font_bbox;
213 FT_ULong uid_base;
214
215 FT_Int num_xuid;
216 FT_ULong xuid[16];
217
218
219 FT_ULong cidmap_offset;
220 FT_Int fd_bytes;
221 FT_Int gd_bytes;
222 FT_ULong cid_count;
223
224 FT_Int num_dicts;
225 CID_FontDict* font_dicts;
226
227 FT_ULong data_offset;
228
229 } CID_Info;
230
231
232 #endif /* T1TABLES_H */
233
234
235 /* END */