sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
t1types.h
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* t1types.h
4
*
5
* Basic Type1/Type2 type definitions and interface (specification
6
* only).
7
*
8
* Copyright (C) 1996-2025 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
24
#ifndef T1TYPES_H_
25
#define T1TYPES_H_
26
27
28
#include <
freetype/ftmm.h
>
29
#include <
freetype/internal/pshints.h
>
30
#include <
freetype/internal/ftserv.h
>
31
#include <
freetype/internal/fthash.h
>
32
#include <
freetype/internal/services/svpscmap.h
>
33
34
35
FT_BEGIN_HEADER
36
37
38
/*************************************************************************/
39
/*************************************************************************/
40
/*************************************************************************/
41
/*** ***/
42
/*** ***/
43
/*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/
44
/*** ***/
45
/*** ***/
46
/*************************************************************************/
47
/*************************************************************************/
48
/*************************************************************************/
49
50
51
/**************************************************************************
52
*
53
* @struct:
54
* T1_EncodingRec
55
*
56
* @description:
57
* A structure modeling a custom encoding.
58
*
59
* @fields:
60
* num_chars ::
61
* The number of character codes in the encoding. Usually 256.
62
*
63
* code_first ::
64
* The lowest valid character code in the encoding.
65
*
66
* code_last ::
67
* The highest valid character code in the encoding + 1. When equal to
68
* code_first there are no valid character codes.
69
*
70
* char_index ::
71
* An array of corresponding glyph indices.
72
*
73
* char_name ::
74
* An array of corresponding glyph names.
75
*/
76
typedef
struct
T1_EncodingRecRec_
77
{
78
FT_Int num_chars;
79
FT_Int code_first;
80
FT_Int code_last;
81
82
FT_UShort* char_index;
83
const
FT_String** char_name;
84
85
} T1_EncodingRec, *T1_Encoding;
86
87
88
/* used to hold extra data of PS_FontInfoRec that
89
* cannot be stored in the publicly defined structure.
90
*
91
* Note these can't be blended with multiple-masters.
92
*/
93
typedef
struct
PS_FontExtraRec_
94
{
95
FT_UShort fs_type;
96
97
} PS_FontExtraRec;
98
99
100
typedef
struct
T1_FontRec_
101
{
102
PS_FontInfoRec font_info;
/* font info dictionary */
103
PS_FontExtraRec font_extra;
/* font info extra fields */
104
PS_PrivateRec private_dict;
/* private dictionary */
105
FT_String* font_name;
/* top-level dictionary */
106
107
T1_EncodingType encoding_type;
108
T1_EncodingRec encoding;
109
110
FT_Byte* subrs_block;
111
FT_Byte* charstrings_block;
112
FT_Byte* glyph_names_block;
113
114
FT_Int num_subrs;
115
FT_Byte** subrs;
116
FT_UInt* subrs_len;
117
FT_Hash subrs_hash;
118
119
FT_Int num_glyphs;
120
FT_String** glyph_names;
/* array of glyph names */
121
FT_Byte** charstrings;
/* array of glyph charstrings */
122
FT_UInt* charstrings_len;
123
124
FT_Byte paint_type;
125
FT_Byte font_type;
126
FT_Matrix font_matrix;
127
FT_Vector font_offset;
128
FT_BBox font_bbox;
129
FT_Long font_id;
130
131
FT_Fixed stroke_width;
132
133
} T1_FontRec, *T1_Font;
134
135
136
typedef
struct
CID_SubrsRec_
137
{
138
FT_Int num_subrs;
139
FT_Byte** code;
140
141
} CID_SubrsRec, *CID_Subrs;
142
143
144
/* this structure is used to store the BlendDesignMap entry for an axis */
145
typedef
struct
PS_DesignMap_
146
{
147
FT_Byte num_points;
148
FT_Long* design_points;
149
FT_Fixed* blend_points;
150
151
} PS_DesignMapRec, *PS_DesignMap;
152
153
/* backward compatible definition */
154
typedef
PS_DesignMapRec T1_DesignMap;
155
156
157
typedef
struct
PS_BlendRec_
158
{
159
FT_UInt num_designs;
160
FT_UInt num_axis;
161
162
FT_String* axis_names[T1_MAX_MM_AXIS];
163
FT_Fixed* design_pos[T1_MAX_MM_DESIGNS];
164
PS_DesignMapRec design_map[T1_MAX_MM_AXIS];
165
166
FT_Fixed* weight_vector;
167
FT_Fixed* default_weight_vector;
168
169
PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1];
170
PS_Private privates [T1_MAX_MM_DESIGNS + 1];
171
172
FT_ULong blend_bitflags;
173
174
FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1];
175
176
/* since 2.3.0 */
177
178
/* undocumented, optional: the default design instance; */
179
/* corresponds to default_weight_vector -- */
180
/* num_default_design_vector == 0 means it is not present */
181
/* in the font and associated metrics files */
182
FT_UInt default_design_vector[T1_MAX_MM_DESIGNS];
183
FT_UInt num_default_design_vector;
184
185
} PS_BlendRec, *PS_Blend;
186
187
188
/* backward compatible definition */
189
typedef
PS_BlendRec T1_Blend;
190
191
192
/*************************************************************************/
193
/*************************************************************************/
194
/*************************************************************************/
195
/*** ***/
196
/*** ***/
197
/*** AFM FONT INFORMATION STRUCTURES ***/
198
/*** ***/
199
/*** ***/
200
/*************************************************************************/
201
/*************************************************************************/
202
/*************************************************************************/
203
204
typedef
struct
AFM_TrackKernRec_
205
{
206
FT_Int degree;
207
FT_Fixed min_ptsize;
208
FT_Fixed min_kern;
209
FT_Fixed max_ptsize;
210
FT_Fixed max_kern;
211
212
} AFM_TrackKernRec, *AFM_TrackKern;
213
214
typedef
struct
AFM_KernPairRec_
215
{
216
FT_UInt index1;
217
FT_UInt index2;
218
FT_Int x;
219
FT_Int y;
220
221
} AFM_KernPairRec, *AFM_KernPair;
222
223
typedef
struct
AFM_FontInfoRec_
224
{
225
FT_Bool IsCIDFont;
226
FT_BBox FontBBox;
227
FT_Fixed Ascender;
/* optional, mind the zero */
228
FT_Fixed Descender;
/* optional, mind the zero */
229
AFM_TrackKern TrackKerns;
/* free if non-NULL */
230
FT_UInt NumTrackKern;
231
AFM_KernPair KernPairs;
/* free if non-NULL */
232
FT_UInt NumKernPair;
233
234
} AFM_FontInfoRec, *AFM_FontInfo;
235
236
237
/*************************************************************************/
238
/*************************************************************************/
239
/*************************************************************************/
240
/*** ***/
241
/*** ***/
242
/*** ORIGINAL T1_FACE CLASS DEFINITION ***/
243
/*** ***/
244
/*** ***/
245
/*************************************************************************/
246
/*************************************************************************/
247
/*************************************************************************/
248
249
250
typedef
struct
T1_FaceRec_
* T1_Face;
251
typedef
struct
CID_FaceRec_
* CID_Face;
252
253
254
typedef
struct
T1_FaceRec_
255
{
256
FT_FaceRec root;
257
T1_FontRec type1;
258
const
void
* psnames;
259
const
void
* psaux;
260
const
void
* afm_data;
261
FT_CharMapRec charmaprecs[2];
262
FT_CharMap charmaps[2];
263
264
/* support for Multiple Masters fonts */
265
PS_Blend blend;
266
267
/* undocumented, optional: indices of subroutines that express */
268
/* the NormalizeDesignVector and the ConvertDesignVector procedure, */
269
/* respectively, as Type 2 charstrings; -1 if keywords not present */
270
FT_Int ndv_idx;
271
FT_Int cdv_idx;
272
273
/* undocumented, optional: has the same meaning as len_buildchar */
274
/* for Type 2 fonts; manipulated by othersubrs 19, 24, and 25 */
275
FT_UInt len_buildchar;
276
FT_Long* buildchar;
277
278
/* since version 2.1 - interface to PostScript hinter */
279
const
void
* pshinter;
280
281
} T1_FaceRec;
282
283
284
typedef
struct
CID_FaceRec_
285
{
286
FT_FaceRec root;
287
void
* psnames;
288
void
* psaux;
289
CID_FaceInfoRec cid;
290
PS_FontExtraRec font_extra;
291
#if 0
292
void
* afm_data;
293
#endif
294
CID_Subrs subrs;
295
296
/* since version 2.1 - interface to PostScript hinter */
297
void
* pshinter;
298
299
/* since version 2.1.8, but was originally positioned after `afm_data' */
300
FT_Byte* binary_data;
/* used if hex data has been converted */
301
FT_Stream cid_stream;
302
303
} CID_FaceRec;
304
305
306
FT_END_HEADER
307
308
#endif
/* T1TYPES_H_ */
309
310
311
/* END */
fthash.h
ftmm.h
ftserv.h
pshints.h
AFM_FontInfoRec_
Definition
t1types.h:224
AFM_KernPairRec_
Definition
t1types.h:215
AFM_TrackKernRec_
Definition
t1types.h:205
CID_FaceRec_
Definition
t1types.h:285
CID_SubrsRec_
Definition
t1types.h:137
PS_BlendRec_
Definition
t1types.h:158
PS_DesignMap_
Definition
t1types.h:146
PS_FontExtraRec_
Definition
t1types.h:94
T1_EncodingRecRec_
Definition
t1types.h:77
T1_FaceRec_
Definition
t1types.h:255
T1_FontRec_
Definition
t1types.h:101
svpscmap.h
freetype
include
freetype
internal
t1types.h
Generated by
1.18.0