1 /***************************************************************************/
5 /* Basic Type 1/Type 2 tables definitions and interface (specification */
8 /* Copyright 1996-2000 by */
9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
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. */
17 /***************************************************************************/
24 #include <freetype/freetype.h>
27 /* Note that we separate font data in T1_FontInfo and T1_Private */
28 /* structures in order to support Multiple Master fonts. */
31 /*************************************************************************/
37 /* A structure used to model a Type1/Type2 FontInfo dictionary. Note */
38 /* that for Multiple Master fonts, each instance has its own */
41 typedef struct T1_FontInfo
46 FT_String* family_name;
49 FT_Bool is_fixed_pitch;
50 FT_Short underline_position;
51 FT_UShort underline_thickness;
56 /*************************************************************************/
62 /* A structure used to model a Type1/Type2 FontInfo dictionary. Note */
63 /* that for Multiple Master fonts, each instance has its own Private */
66 typedef struct T1_Private
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;
76 FT_Short blue_values[14];
77 FT_Short other_blues[10];
79 FT_Short family_blues [14];
80 FT_Short family_other_blues[10];
86 FT_UShort standard_width[1];
87 FT_UShort standard_height[1];
89 FT_Byte num_snap_widths;
90 FT_Byte num_snap_heights;
92 FT_Bool round_stem_up;
94 FT_Short snap_widths [13]; /* reserve one place for the std */
95 FT_Short snap_heights[13]; /* reserve one place for the std */
97 FT_Long language_group;
100 FT_Short min_feature[2];
105 /*************************************************************************/
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. */
117 /* required fields in a FontInfo blend dictionary */
118 t1_blend_underline_position = 0,
119 t1_blend_underline_thickness,
120 t1_blend_italic_angle,
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,
131 t1_blend_family_blues,
132 t1_blend_family_other_blues,
141 /* maximum number of Multiple Masters designs, as defined in the spec */
142 #define T1_MAX_MM_DESIGNS 16
144 /* maximum number of Multiple Masters axes, as defined in the spec */
145 #define T1_MAX_MM_AXIS 4
147 /* maximum number of elements in a design map */
148 #define T1_MAX_MM_MAP_POINTS 20
151 /* this structure is used to store the BlendDesignMap entry for an axis */
152 typedef struct T1_DesignMap_
155 FT_Fixed* design_points;
156 FT_Fixed* blend_points;
161 typedef struct T1_Blend_
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];
170 FT_Fixed* weight_vector;
171 FT_Fixed* default_weight_vector;
173 T1_FontInfo* font_infos[T1_MAX_MM_DESIGNS + 1];
174 T1_Private* privates [T1_MAX_MM_DESIGNS + 1];
176 FT_ULong blend_bitflags;
181 typedef struct CID_FontDict_
183 T1_Private private_dict;
185 FT_UInt len_buildchar;
186 FT_Fixed forcebold_threshold;
188 FT_Fixed expansion_factor;
192 FT_Matrix font_matrix;
195 FT_ULong subrmap_offset;
201 typedef struct CID_Info_
203 FT_String* cid_font_name;
204 FT_Fixed cid_version;
205 FT_Int cid_font_type;
211 T1_FontInfo font_info;
219 FT_ULong cidmap_offset;
225 CID_FontDict* font_dicts;
227 FT_ULong data_offset;
232 #endif /* T1TABLES_H */