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