1 /***************************************************************************/
5 /* Basic Type 1/Type 2 tables definitions and interface (specification */
8 /* Copyright 1996-2001 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 /***************************************************************************/
20 #ifndef __T1TABLES_H__
21 #define __T1TABLES_H__
25 #include FT_FREETYPE_H
31 /*************************************************************************/
40 /* Type 1 (PostScript) specific font tables. */
43 /* This section contains the definition of Type 1-specific tables, */
44 /* including structures related to other PostScript font formats. */
46 /*************************************************************************/
49 /* Note that we separate font data in T1_FontInfo and T1_Private */
50 /* structures in order to support Multiple Master fonts. */
53 /*************************************************************************/
59 /* A structure used to model a Type1/Type2 FontInfo dictionary. Note */
60 /* that for Multiple Master fonts, each instance has its own */
63 typedef struct T1_FontInfo
68 FT_String* family_name;
71 FT_Bool is_fixed_pitch;
72 FT_Short underline_position;
73 FT_UShort underline_thickness;
78 /*************************************************************************/
84 /* A structure used to model a Type1/Type2 FontInfo dictionary. Note */
85 /* that for Multiple Master fonts, each instance has its own Private */
88 typedef struct T1_Private
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;
98 FT_Short blue_values[14];
99 FT_Short other_blues[10];
101 FT_Short family_blues [14];
102 FT_Short family_other_blues[10];
108 FT_UShort standard_width[1];
109 FT_UShort standard_height[1];
111 FT_Byte num_snap_widths;
112 FT_Byte num_snap_heights;
114 FT_Bool round_stem_up;
116 FT_Short snap_widths [13]; /* including std width */
117 FT_Short snap_heights[13]; /* including std height */
119 FT_Long language_group;
122 FT_Short min_feature[2];
127 /*************************************************************************/
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. */
139 /*# required fields in a FontInfo blend dictionary */
140 t1_blend_underline_position = 0,
141 t1_blend_underline_thickness,
142 t1_blend_italic_angle,
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,
153 t1_blend_family_blues,
154 t1_blend_family_other_blues,
163 /* maximum number of Multiple Masters designs, as defined in the spec */
164 #define T1_MAX_MM_DESIGNS 16
166 /* maximum number of Multiple Masters axes, as defined in the spec */
167 #define T1_MAX_MM_AXIS 4
169 /* maximum number of elements in a design map */
170 #define T1_MAX_MM_MAP_POINTS 20
173 /* this structure is used to store the BlendDesignMap entry for an axis */
174 typedef struct T1_DesignMap_
177 FT_Fixed* design_points;
178 FT_Fixed* blend_points;
183 typedef struct T1_Blend_
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];
192 FT_Fixed* weight_vector;
193 FT_Fixed* default_weight_vector;
195 T1_FontInfo* font_infos[T1_MAX_MM_DESIGNS + 1];
196 T1_Private* privates [T1_MAX_MM_DESIGNS + 1];
198 FT_ULong blend_bitflags;
203 typedef struct CID_FontDict_
205 T1_Private private_dict;
207 FT_UInt len_buildchar;
208 FT_Fixed forcebold_threshold;
210 FT_Fixed expansion_factor;
214 FT_Matrix font_matrix;
215 FT_Vector font_offset;
218 FT_ULong subrmap_offset;
224 typedef struct CID_Info_
226 FT_String* cid_font_name;
227 FT_Fixed cid_version;
228 FT_Int cid_font_type;
234 T1_FontInfo font_info;
242 FT_ULong cidmap_offset;
248 CID_FontDict* font_dicts;
250 FT_ULong data_offset;
260 #endif /* __T1TABLES_H__ */