ReactOS 0.4.16-dev-2358-g0df3463
pfrtypes.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * pfrtypes.h
4 *
5 * FreeType PFR data structures (specification only).
6 *
7 * Copyright (C) 2002-2020 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
9 *
10 * This file is part of the FreeType project, and may only be used,
11 * modified, and distributed under the terms of the FreeType project
12 * license, LICENSE.TXT. By continuing to use, modify, or distribute
13 * this file you indicate that you have read the license and
14 * understand and accept it fully.
15 *
16 */
17
18
19#ifndef PFRTYPES_H_
20#define PFRTYPES_H_
21
23
25
26 /************************************************************************/
27
28 /* the PFR Header structure */
29 typedef struct PFR_HeaderRec_
30 {
31 FT_UInt32 signature;
35
38
42
46
50
54
57
58 FT_UInt32 bct_max_size;
61
66
68
69
70 /* used in `color_flags' field of the PFR_Header */
71#define PFR_FLAG_BLACK_PIXEL 0x01U
72#define PFR_FLAG_INVERT_BITMAP 0x02U
73
74
75 /************************************************************************/
76
77 typedef struct PFR_LogFontRec_
78 {
79 FT_UInt32 size;
80 FT_UInt32 offset;
81
82 FT_Int32 matrix[4];
86 FT_Int32 miter_limit;
87
88 FT_UInt32 phys_size;
89 FT_UInt32 phys_offset;
90
92
93
94#define PFR_LINE_JOIN_MITER 0x00U
95#define PFR_LINE_JOIN_ROUND 0x01U
96#define PFR_LINE_JOIN_BEVEL 0x02U
97#define PFR_LINE_JOIN_MASK ( PFR_LINE_JOIN_ROUND | PFR_LINE_JOIN_BEVEL )
98
99#define PFR_LOG_STROKE 0x04U
100#define PFR_LOG_2BYTE_STROKE 0x08U
101#define PFR_LOG_BOLD 0x10U
102#define PFR_LOG_2BYTE_BOLD 0x20U
103#define PFR_LOG_EXTRA_ITEMS 0x40U
104
105
106 /************************************************************************/
107
108#define PFR_BITMAP_2BYTE_CHARCODE 0x01U
109#define PFR_BITMAP_2BYTE_SIZE 0x02U
110#define PFR_BITMAP_3BYTE_OFFSET 0x04U
111
112 /*not part of the specification but used for implementation */
113#define PFR_BITMAP_CHARCODES_VALIDATED 0x40U
114#define PFR_BITMAP_VALID_CHARCODES 0x80U
115
116
117 typedef struct PFR_BitmapCharRec_
118 {
121 FT_UInt32 gps_offset;
122
124
125
126#define PFR_STRIKE_2BYTE_XPPM 0x01U
127#define PFR_STRIKE_2BYTE_YPPM 0x02U
128#define PFR_STRIKE_3BYTE_SIZE 0x04U
129#define PFR_STRIKE_3BYTE_OFFSET 0x08U
130#define PFR_STRIKE_2BYTE_COUNT 0x10U
131
132
133 typedef struct PFR_StrikeRec_
134 {
138
139 FT_UInt32 gps_size;
140 FT_UInt32 gps_offset;
141
142 FT_UInt32 bct_size;
143 FT_UInt32 bct_offset;
144
145 /* optional */
148
150
151
152 /************************************************************************/
153
154 typedef struct PFR_CharRec_
155 {
159 FT_UInt32 gps_offset;
160
162
163
164 /************************************************************************/
165
166 typedef struct PFR_DimensionRec_
167 {
171
173
174 /************************************************************************/
175
177
178 typedef struct PFR_KernItemRec_
179 {
186 FT_UInt32 pair1;
187 FT_UInt32 pair2;
188
190
191
192#define PFR_KERN_INDEX( g1, g2 ) \
193 ( ( (FT_UInt32)(g1) << 16 ) | (FT_UInt16)(g2) )
194
195#define PFR_KERN_PAIR_INDEX( pair ) \
196 PFR_KERN_INDEX( (pair)->glyph1, (pair)->glyph2 )
197
198#define PFR_NEXT_KPAIR( p ) ( p += 2, \
199 ( (FT_UInt32)p[-2] << 16 ) | p[-1] )
200
201
202 /************************************************************************/
203
204 typedef struct PFR_PhyFontRec_
205 {
207 FT_UInt32 offset;
208
215
216 FT_Int ascent; /* optional, bbox.yMax if not present */
217 FT_Int descent; /* optional, bbox.yMin if not present */
218 FT_Int leading; /* optional, 0 if not present */
219
222
226
230
235
239
243
244 /* not part of the spec, but used during load */
247
249
250
251#define PFR_PHY_VERTICAL 0x01U
252#define PFR_PHY_2BYTE_CHARCODE 0x02U
253#define PFR_PHY_PROPORTIONAL 0x04U
254#define PFR_PHY_ASCII_CODE 0x08U
255#define PFR_PHY_2BYTE_GPS_SIZE 0x10U
256#define PFR_PHY_3BYTE_GPS_OFFSET 0x20U
257#define PFR_PHY_EXTRA_ITEMS 0x80U
258
259
260#define PFR_KERN_2BYTE_CHAR 0x01U
261#define PFR_KERN_2BYTE_ADJ 0x02U
262
263
264 /************************************************************************/
265
266#define PFR_GLYPH_YCOUNT 0x01U
267#define PFR_GLYPH_XCOUNT 0x02U
268#define PFR_GLYPH_1BYTE_XYCOUNT 0x04U
269
270#define PFR_GLYPH_SINGLE_EXTRA_ITEMS 0x08U
271#define PFR_GLYPH_COMPOUND_EXTRA_ITEMS 0x40U
272
273#define PFR_GLYPH_IS_COMPOUND 0x80U
274
275
276 /* controlled coordinate */
277 typedef struct PFR_CoordRec_
278 {
281
283
284
285 typedef struct PFR_SubGlyphRec_
286 {
291 FT_UInt32 gps_offset;
293
295
296
297#define PFR_SUBGLYPH_XSCALE 0x10U
298#define PFR_SUBGLYPH_YSCALE 0x20U
299#define PFR_SUBGLYPH_2BYTE_SIZE 0x40U
300#define PFR_SUBGLYPH_3BYTE_OFFSET 0x80U
301
302
303 typedef struct PFR_GlyphRec_
304 {
306
307#if 0
308 FT_UInt num_x_control;
309 FT_UInt num_y_control;
310#endif
314
315
319
322
324
325
327
328#endif /* PFRTYPES_H_ */
329
330
331/* END */
#define FT_END_HEADER
Definition: ftheader.h:57
#define FT_BEGIN_HEADER
Definition: ftheader.h:37
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:57
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:64
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
unsigned long FT_ULong
Definition: fttypes.h:253
unsigned char FT_Byte
Definition: fttypes.h:154
signed long FT_Fixed
Definition: fttypes.h:287
char FT_String
Definition: fttypes.h:187
signed short FT_Short
Definition: fttypes.h:198
unsigned int FT_UInt
Definition: fttypes.h:231
size_t FT_Offset
Definition: fttypes.h:323
signed int FT_Int
Definition: fttypes.h:220
GLuint GLenum matrix
Definition: glext.h:9407
struct PFR_CharRec_ PFR_CharRec
struct PFR_GlyphRec_ PFR_GlyphRec
struct PFR_KernItemRec_ * PFR_KernItem
Definition: pfrtypes.h:176
struct PFR_StrikeRec_ * PFR_Strike
struct PFR_DimensionRec_ * PFR_Dimension
struct PFR_PhyFontRec_ PFR_PhyFontRec
struct PFR_LogFontRec_ PFR_LogFontRec
struct PFR_PhyFontRec_ * PFR_PhyFont
struct PFR_CoordRec_ PFR_CoordRec
struct PFR_KernItemRec_ PFR_KernItemRec
struct PFR_StrikeRec_ PFR_StrikeRec
struct PFR_DimensionRec_ PFR_DimensionRec
struct PFR_BitmapCharRec_ * PFR_BitmapChar
struct PFR_SubGlyphRec_ * PFR_SubGlyph
struct PFR_CoordRec_ * PFR_Coord
struct PFR_CharRec_ * PFR_Char
struct PFR_BitmapCharRec_ PFR_BitmapCharRec
struct PFR_SubGlyphRec_ PFR_SubGlyphRec
struct PFR_GlyphRec_ * PFR_Glyph
struct PFR_LogFontRec_ * PFR_LogFont
FT_BEGIN_HEADER struct PFR_HeaderRec_ * PFR_Header
FT_BEGIN_HEADER struct PFR_HeaderRec_ PFR_HeaderRec
FT_UInt gps_size
Definition: pfrtypes.h:120
FT_UInt char_code
Definition: pfrtypes.h:119
FT_UInt32 gps_offset
Definition: pfrtypes.h:121
FT_UInt32 gps_offset
Definition: pfrtypes.h:159
FT_UInt char_code
Definition: pfrtypes.h:156
FT_Int advance
Definition: pfrtypes.h:157
FT_UInt gps_size
Definition: pfrtypes.h:158
FT_UInt org
Definition: pfrtypes.h:279
FT_UInt cur
Definition: pfrtypes.h:280
FT_UInt num_stem_snaps
Definition: pfrtypes.h:169
FT_UInt standard
Definition: pfrtypes.h:168
FT_Int * stem_snaps
Definition: pfrtypes.h:170
FT_Pos * y_control
Definition: pfrtypes.h:313
PFR_SubGlyphRec * subs
Definition: pfrtypes.h:318
FT_GlyphLoader loader
Definition: pfrtypes.h:320
FT_Pos * x_control
Definition: pfrtypes.h:312
FT_UInt num_subs
Definition: pfrtypes.h:316
FT_UInt max_xy_control
Definition: pfrtypes.h:311
FT_UInt max_subs
Definition: pfrtypes.h:317
FT_Byte format
Definition: pfrtypes.h:305
FT_Bool path_begun
Definition: pfrtypes.h:321
FT_UInt max_vert_stem_snap
Definition: pfrtypes.h:63
FT_UInt32 gps_section_offset
Definition: pfrtypes.h:49
FT_UInt32 phy_font_section_size
Definition: pfrtypes.h:44
FT_UInt max_horz_stem_snap
Definition: pfrtypes.h:64
FT_UInt max_blue_values
Definition: pfrtypes.h:51
FT_UInt log_font_max_size
Definition: pfrtypes.h:39
FT_UInt num_phy_fonts
Definition: pfrtypes.h:62
FT_UInt max_x_orus
Definition: pfrtypes.h:52
FT_UInt32 log_font_section_size
Definition: pfrtypes.h:40
FT_UInt32 signature
Definition: pfrtypes.h:31
FT_UInt header_size
Definition: pfrtypes.h:34
FT_UInt gps_max_size
Definition: pfrtypes.h:47
FT_UInt32 bct_max_size
Definition: pfrtypes.h:58
FT_UInt max_chars
Definition: pfrtypes.h:65
FT_UInt version
Definition: pfrtypes.h:32
FT_UInt32 gps_section_size
Definition: pfrtypes.h:48
FT_UInt color_flags
Definition: pfrtypes.h:56
FT_UInt max_y_orus
Definition: pfrtypes.h:53
FT_UInt32 log_font_section_offset
Definition: pfrtypes.h:41
FT_UInt phy_font_max_size_high
Definition: pfrtypes.h:55
FT_UInt32 bct_set_max_size
Definition: pfrtypes.h:59
FT_UInt32 phy_font_section_offset
Definition: pfrtypes.h:45
FT_UInt log_dir_offset
Definition: pfrtypes.h:37
FT_UInt32 phy_bct_set_max_size
Definition: pfrtypes.h:60
FT_UInt log_dir_size
Definition: pfrtypes.h:36
FT_UInt32 phy_font_max_size
Definition: pfrtypes.h:43
FT_UInt signature2
Definition: pfrtypes.h:33
FT_Byte flags
Definition: pfrtypes.h:182
FT_UInt32 pair2
Definition: pfrtypes.h:187
FT_UInt32 pair1
Definition: pfrtypes.h:186
FT_Short base_adj
Definition: pfrtypes.h:183
PFR_KernItem next
Definition: pfrtypes.h:180
FT_UInt pair_size
Definition: pfrtypes.h:184
FT_Byte pair_count
Definition: pfrtypes.h:181
FT_Offset offset
Definition: pfrtypes.h:185
FT_UInt32 phys_offset
Definition: pfrtypes.h:89
FT_UInt32 offset
Definition: pfrtypes.h:80
FT_UInt32 phys_size
Definition: pfrtypes.h:88
FT_Int stroke_thickness
Definition: pfrtypes.h:84
FT_UInt stroke_flags
Definition: pfrtypes.h:83
FT_UInt32 size
Definition: pfrtypes.h:79
FT_Int bold_thickness
Definition: pfrtypes.h:85
FT_Int32 miter_limit
Definition: pfrtypes.h:86
FT_UInt32 offset
Definition: pfrtypes.h:207
FT_UInt outline_resolution
Definition: pfrtypes.h:210
PFR_KernItem kern_items
Definition: pfrtypes.h:241
PFR_KernItem * kern_items_tail
Definition: pfrtypes.h:242
FT_String * font_id
Definition: pfrtypes.h:223
FT_UInt flags
Definition: pfrtypes.h:213
FT_BBox bbox
Definition: pfrtypes.h:212
FT_UInt num_chars
Definition: pfrtypes.h:236
PFR_DimensionRec horizontal
Definition: pfrtypes.h:220
FT_Offset chars_offset
Definition: pfrtypes.h:237
FT_Int leading
Definition: pfrtypes.h:218
FT_Memory memory
Definition: pfrtypes.h:206
FT_UInt metrics_resolution
Definition: pfrtypes.h:211
FT_String * family_name
Definition: pfrtypes.h:224
FT_Int ascent
Definition: pfrtypes.h:216
FT_UInt num_kern_pairs
Definition: pfrtypes.h:240
FT_UInt blue_fuzz
Definition: pfrtypes.h:233
PFR_DimensionRec vertical
Definition: pfrtypes.h:221
PFR_Char chars
Definition: pfrtypes.h:238
PFR_StrikeRec * strikes
Definition: pfrtypes.h:229
FT_ULong bct_offset
Definition: pfrtypes.h:245
FT_UInt max_strikes
Definition: pfrtypes.h:228
FT_Int descent
Definition: pfrtypes.h:217
FT_Int standard_advance
Definition: pfrtypes.h:214
FT_UInt num_blue_values
Definition: pfrtypes.h:231
FT_UInt font_ref_number
Definition: pfrtypes.h:209
FT_String * style_name
Definition: pfrtypes.h:225
FT_Int * blue_values
Definition: pfrtypes.h:232
FT_UInt num_strikes
Definition: pfrtypes.h:227
FT_Byte * cursor
Definition: pfrtypes.h:246
FT_UInt blue_scale
Definition: pfrtypes.h:234
FT_UInt num_bitmaps
Definition: pfrtypes.h:146
PFR_BitmapChar bitmaps
Definition: pfrtypes.h:147
FT_UInt x_ppm
Definition: pfrtypes.h:135
FT_UInt flags
Definition: pfrtypes.h:137
FT_UInt32 gps_offset
Definition: pfrtypes.h:140
FT_UInt32 bct_size
Definition: pfrtypes.h:142
FT_UInt32 gps_size
Definition: pfrtypes.h:139
FT_UInt32 bct_offset
Definition: pfrtypes.h:143
FT_UInt y_ppm
Definition: pfrtypes.h:136
FT_Fixed x_scale
Definition: pfrtypes.h:287
FT_Int y_delta
Definition: pfrtypes.h:290
FT_UInt32 gps_offset
Definition: pfrtypes.h:291
FT_Int x_delta
Definition: pfrtypes.h:289
FT_UInt gps_size
Definition: pfrtypes.h:292
FT_Fixed y_scale
Definition: pfrtypes.h:288