1 /***************************************************************************/
5 /* Basic Type1/Type2 type definitions and interface (specification */
8 /* Copyright 1996-2001, 2002, 2003, 2004, 2006 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 /***************************************************************************/
25 #include FT_TYPE1_TABLES_H
26 #include FT_INTERNAL_POSTSCRIPT_HINTS_H
27 #include FT_INTERNAL_SERVICE_H
28 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
34 /*************************************************************************/
35 /*************************************************************************/
36 /*************************************************************************/
39 /*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/
42 /*************************************************************************/
43 /*************************************************************************/
44 /*************************************************************************/
47 /*************************************************************************/
53 /* A structure modeling a custom encoding. */
56 /* num_chars :: The number of character codes in the encoding. */
59 /* code_first :: The lowest valid character code in the encoding. */
61 /* code_last :: The highest valid character code in the encoding. */
63 /* char_index :: An array of corresponding glyph indices. */
65 /* char_name :: An array of corresponding glyph names. */
67 typedef struct T1_EncodingRecRec_
73 FT_UShort
* char_index
;
74 FT_String
** char_name
;
76 } T1_EncodingRec
, *T1_Encoding
;
79 typedef enum T1_EncodingType_
81 T1_ENCODING_TYPE_NONE
= 0,
82 T1_ENCODING_TYPE_ARRAY
,
83 T1_ENCODING_TYPE_STANDARD
,
84 T1_ENCODING_TYPE_ISOLATIN1
,
85 T1_ENCODING_TYPE_EXPERT
90 typedef struct T1_FontRec_
92 PS_FontInfoRec font_info
; /* font info dictionary */
93 PS_PrivateRec private_dict
; /* private dictionary */
94 FT_String
* font_name
; /* top-level dictionary */
96 T1_EncodingType encoding_type
;
97 T1_EncodingRec encoding
;
100 FT_Byte
* charstrings_block
;
101 FT_Byte
* glyph_names_block
;
105 FT_PtrDist
* subrs_len
;
108 FT_String
** glyph_names
; /* array of glyph names */
109 FT_Byte
** charstrings
; /* array of glyph charstrings */
110 FT_PtrDist
* charstrings_len
;
114 FT_Matrix font_matrix
;
115 FT_Vector font_offset
;
119 FT_Fixed stroke_width
;
121 } T1_FontRec
, *T1_Font
;
124 typedef struct CID_SubrsRec_
129 } CID_SubrsRec
, *CID_Subrs
;
132 /*************************************************************************/
133 /*************************************************************************/
134 /*************************************************************************/
137 /*** AFM FONT INFORMATION STRUCTURES ***/
140 /*************************************************************************/
141 /*************************************************************************/
142 /*************************************************************************/
144 typedef struct AFM_TrackKernRec_
152 } AFM_TrackKernRec
, *AFM_TrackKern
;
154 typedef struct AFM_KernPairRec_
161 } AFM_KernPairRec
, *AFM_KernPair
;
163 typedef struct AFM_FontInfoRec_
169 AFM_TrackKern TrackKerns
; /* free if non-NULL */
171 AFM_KernPair KernPairs
; /* free if non-NULL */
174 } AFM_FontInfoRec
, *AFM_FontInfo
;
177 /*************************************************************************/
178 /*************************************************************************/
179 /*************************************************************************/
182 /*** ORIGINAL T1_FACE CLASS DEFINITION ***/
185 /*************************************************************************/
186 /*************************************************************************/
187 /*************************************************************************/
190 typedef struct T1_FaceRec_
* T1_Face
;
191 typedef struct CID_FaceRec_
* CID_Face
;
194 typedef struct T1_FaceRec_
200 const void* afm_data
;
201 FT_CharMapRec charmaprecs
[2];
202 FT_CharMap charmaps
[2];
204 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
205 PS_Unicodes unicode_map
;
208 /* support for Multiple Masters fonts */
211 /* undocumented, optional: indices of subroutines that express */
212 /* the NormalizeDesignVector and the ConvertDesignVector procedure, */
213 /* respectively, as Type 2 charstrings; -1 if keywords not present */
217 /* undocumented, optional: has the same meaning as len_buildchar */
218 /* for Type 2 fonts; manipulated by othersubrs 19, 24, and 25 */
219 FT_UInt len_buildchar
;
222 /* since version 2.1 - interface to PostScript hinter */
223 const void* pshinter
;
228 typedef struct CID_FaceRec_
237 /* since version 2.1 - interface to PostScript hinter */
240 /* since version 2.1.8, but was originally positioned after `afm_data' */
241 FT_Byte
* binary_data
; /* used if hex data has been converted */
242 FT_Stream cid_stream
;
249 #endif /* __T1TYPES_H__ */