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