Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
cfftypes.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* cfftypes.h */
4 /* */
5 /* Basic OpenType/CFF type definitions and interface (specification */
6 /* only). */
7 /* */
8 /* Copyright 1996-2003, 2006-2008, 2010-2011, 2013 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 
20 #ifndef __CFFTYPES_H__
21 #define __CFFTYPES_H__
22 
23 
24 #include <ft2build.h>
25 #include FT_FREETYPE_H
26 #include FT_TYPE1_TABLES_H
27 #include FT_INTERNAL_SERVICE_H
28 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
29 #include FT_INTERNAL_POSTSCRIPT_HINTS_H
30 
31 
33 
34 
35  /*************************************************************************/
36  /* */
37  /* <Struct> */
38  /* CFF_IndexRec */
39  /* */
40  /* <Description> */
41  /* A structure used to model a CFF Index table. */
42  /* */
43  /* <Fields> */
44  /* stream :: The source input stream. */
45  /* */
46  /* start :: The position of the first index byte in the */
47  /* input stream. */
48  /* */
49  /* count :: The number of elements in the index. */
50  /* */
51  /* off_size :: The size in bytes of object offsets in index. */
52  /* */
53  /* data_offset :: The position of first data byte in the index's */
54  /* bytes. */
55  /* */
56  /* data_size :: The size of the data table in this index. */
57  /* */
58  /* offsets :: A table of element offsets in the index. Must be */
59  /* loaded explicitly. */
60  /* */
61  /* bytes :: If the index is loaded in memory, its bytes. */
62  /* */
63  typedef struct CFF_IndexRec_
64  {
71 
74 
76 
77 
78  typedef struct CFF_EncodingRec_
79  {
82 
84  FT_UShort sids [256]; /* avoid dynamic allocations */
86 
88 
89 
90  typedef struct CFF_CharsetRec_
91  {
92 
95 
97  FT_UShort* cids; /* the inverse mapping of `sids'; only needed */
98  /* for CID-keyed fonts */
101 
103 
104 
105  typedef struct CFF_FontRecDictRec_
106  {
121  FT_ULong units_per_em; /* temporarily used as scaling value also */
133 
134  /* these should only be used for the top-level font dictionary */
138 
147 
149 
150 
151  typedef struct CFF_PrivateRec_
152  {
157 
159  FT_Pos other_blues[10];
161  FT_Pos family_other_blues[10];
162 
168 
171  FT_Pos snap_widths[13];
182 
184 
185 
186  typedef struct CFF_FDSelectRec_
187  {
190 
191  /* that's the table, taken from the file `as is' */
194 
195  /* small cache for format 3 only */
199 
201 
202 
203  /* A SubFont packs a font dict and a private dict together. They are */
204  /* needed to support CID-keyed CFF fonts. */
205  typedef struct CFF_SubFontRec_
206  {
209 
211  FT_Byte** local_subrs; /* array of pointers into Local Subrs INDEX data */
212 
214 
215 
216 #define CFF_MAX_CID_FONTS 256
217 
218 
219  typedef struct CFF_FontRec_
220  {
225 
230 
231 
235 
238 
243 
245 
246  /* array of pointers into Global Subrs INDEX data */
248 
249  /* array of pointers into String INDEX data stored at string_pool */
253 
256  CFF_SubFont subfonts[CFF_MAX_CID_FONTS];
257 
259 
260  /* interface to PostScript hinter */
262 
263  /* interface to Postscript Names service */
264  FT_Service_PsCMaps psnames;
265 
266  /* since version 2.3.0 */
267  PS_FontInfoRec* font_info; /* font info dictionary */
268 
269  /* since version 2.3.6 */
272 
273  /* since version 2.4.12 */
275 
276  } CFF_FontRec, *CFF_Font;
277 
278 
280 
281 #endif /* __CFFTYPES_H__ */
282 
283 
284 /* END */
CFF_IndexRec name_index
Definition: cfftypes.h:232
FT_String * registry
Definition: cfftypes.h:270
FT_ULong charset_offset
Definition: cfftypes.h:126
FT_UInt num_faces
Definition: cfftypes.h:223
FT_Byte * bytes
Definition: cfftypes.h:73
FT_ULong cid_uid_base
Definition: cfftypes.h:143
CFF_IndexRec local_subrs_index
Definition: cfftypes.h:242
signed long FT_Long
Definition: fttypes.h:238
unsigned long FT_ULong
Definition: fttypes.h:249
FT_Byte header_size
Definition: cfftypes.h:228
FT_Stream stream
Definition: cfftypes.h:221
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:59
FT_ULong cid_fd_select_offset
Definition: cfftypes.h:145
CFF_IndexRec local_subrs_index
Definition: cfftypes.h:210
#define FT_END_HEADER
Definition: ftheader.h:54
FT_Byte cache_fd
Definition: cfftypes.h:198
signed int FT_Int
Definition: fttypes.h:216
FT_ULong private_offset
Definition: cfftypes.h:129
FT_Byte * data
Definition: cfftypes.h:192
FT_UInt cache_first
Definition: cfftypes.h:196
FT_String * ordering
Definition: cfftypes.h:271
FT_Fixed blue_scale
Definition: cfftypes.h:163
FT_Long initial_random_seed
Definition: cfftypes.h:178
FT_Pos blue_shift
Definition: cfftypes.h:164
struct CFF_FontRecDictRec_ CFF_FontRecDictRec
FT_Fixed underline_position
Definition: cfftypes.h:115
FT_ULong start
Definition: cfftypes.h:66
struct CFF_FontRec_ CFF_FontRec
struct CFF_EncodingRec_ CFF_EncodingRec
struct CFF_SubFontRec_ CFF_SubFontRec
FT_Long cid_font_type
Definition: cfftypes.h:141
PS_FontInfoRec * font_info
Definition: cfftypes.h:267
FT_Int charstring_type
Definition: cfftypes.h:118
struct CFF_FontRec_ * CFF_Font
FT_UInt embedded_postscript
Definition: cfftypes.h:132
CFF_IndexRec global_subrs_index
Definition: cfftypes.h:234
struct CFF_FontRecDictRec_ * CFF_FontRecDict
FT_ULong private_size
Definition: cfftypes.h:130
PSHinter_Service pshinter
Definition: cfftypes.h:261
FT_Pos default_width
Definition: cfftypes.h:180
FT_UInt count
Definition: cfftypes.h:67
CFF_EncodingRec encoding
Definition: cfftypes.h:236
FT_Long cid_supplement
Definition: cfftypes.h:137
FT_Fixed underline_thickness
Definition: cfftypes.h:116
FT_Byte num_snap_heights
Definition: cfftypes.h:170
T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE family_blues
Definition: t1tokens.h:78
FT_Byte num_snap_widths
Definition: cfftypes.h:169
FT_Fixed expansion_factor
Definition: cfftypes.h:177
FT_Long synthetic_base
Definition: cfftypes.h:131
FT_Byte num_family_other_blues
Definition: cfftypes.h:156
FT_ULong local_subrs_offset
Definition: cfftypes.h:179
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
FT_Service_PsCMaps psnames
Definition: cfftypes.h:264
FT_ULong unique_id
Definition: cfftypes.h:123
FT_Vector font_offset
Definition: cfftypes.h:122
FT_Bool has_font_matrix
Definition: cfftypes.h:120
unsigned char FT_Byte
Definition: fttypes.h:150
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
FT_Byte * string_pool
Definition: cfftypes.h:252
FT_BEGIN_HEADER struct CFF_IndexRec_ CFF_IndexRec
FT_UInt num_subfonts
Definition: cfftypes.h:255
FT_Byte ** global_subrs
Definition: cfftypes.h:247
CFF_FontRecDictRec font_dict
Definition: cfftypes.h:207
struct CFF_PrivateRec_ CFF_PrivateRec
FT_Bool force_bold
Definition: cfftypes.h:173
FT_ULong charstrings_offset
Definition: cfftypes.h:128
FT_ULong cid_fd_array_offset
Definition: cfftypes.h:144
CFF_FDSelectRec fd_select
Definition: cfftypes.h:258
FT_ULong offset
Definition: cfftypes.h:81
FT_UInt max_cid
Definition: cfftypes.h:99
FT_Long cid_font_version
Definition: cfftypes.h:139
FT_UInt num_strings
Definition: cfftypes.h:250
FT_Int language_group
Definition: cfftypes.h:176
char FT_String
Definition: fttypes.h:183
FT_UInt family_name
Definition: cfftypes.h:111
struct CFF_SubFontRec_ * CFF_SubFont
CFF_SubFontRec top_font
Definition: cfftypes.h:254
FT_ULong encoding_offset
Definition: cfftypes.h:127
CFF_PrivateRec private_dict
Definition: cfftypes.h:208
CFF_IndexRec font_dict_index
Definition: cfftypes.h:240
FT_Pos standard_width
Definition: cfftypes.h:166
CFF_IndexRec private_index
Definition: cfftypes.h:241
FT_Byte ** strings
Definition: cfftypes.h:251
FT_UShort * cids
Definition: cfftypes.h:97
#define CFF_MAX_CID_FONTS
Definition: cfftypes.h:216
CFF_IndexRec top_dict_index
Definition: cfftypes.h:233
struct CFF_CharsetRec_ * CFF_Charset
T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE snap_heights
Definition: t1tokens.h:92
FT_Memory memory
Definition: cfftypes.h:222
struct CFF_PrivateRec_ * CFF_Private
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
FT_Byte ** local_subrs
Definition: cfftypes.h:211
FT_Byte version_minor
Definition: cfftypes.h:227
FT_UInt format
Definition: cfftypes.h:80
FT_ULong cid_count
Definition: cfftypes.h:142
FT_Byte num_family_blues
Definition: cfftypes.h:155
FT_Int lenIV
Definition: cfftypes.h:175
FT_Fixed force_bold_threshold
Definition: cfftypes.h:174
FT_ULong offset
Definition: cfftypes.h:94
FT_String * font_name
Definition: cfftypes.h:244
FT_UInt cid_font_name
Definition: cfftypes.h:146
FT_ULong data_size
Definition: cfftypes.h:70
T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE T1_FIELD_DICT_PRIVATE blue_values
Definition: t1tokens.h:74
FT_Byte format
Definition: cfftypes.h:188
FT_Fixed italic_angle
Definition: cfftypes.h:114
signed long FT_Fixed
Definition: fttypes.h:284
FT_Bool is_fixed_pitch
Definition: cfftypes.h:113
FT_UInt cid_ordering
Definition: cfftypes.h:136
FT_Byte version_major
Definition: cfftypes.h:226
struct CFF_FDSelectRec_ CFF_FDSelectRec
unsigned int FT_UInt
Definition: fttypes.h:227
FT_UInt cache_count
Definition: cfftypes.h:197
FT_ULong units_per_em
Definition: cfftypes.h:121
FT_Matrix font_matrix
Definition: cfftypes.h:119
FT_Byte absolute_offsize
Definition: cfftypes.h:229
struct CFF_FDSelectRec_ * CFF_FDSelect
struct CFF_EncodingRec_ * CFF_Encoding
FT_ULong data_offset
Definition: cfftypes.h:69
FT_Byte num_blue_values
Definition: cfftypes.h:153
FT_Pos blue_fuzz
Definition: cfftypes.h:165
FT_Byte off_size
Definition: cfftypes.h:68
FT_BEGIN_HEADER struct PS_FontInfoRec_ PS_FontInfoRec
CFF_IndexRec charstrings_index
Definition: cfftypes.h:239
FT_ULong * offsets
Definition: cfftypes.h:72
FT_UInt num_glyphs
Definition: cfftypes.h:100
local int codes(struct state *s, const struct huffman *lencode, const struct huffman *distcode)
Definition: puff.c:436
FT_UInt count
Definition: cfftypes.h:83
FT_UInt num_glyphs
Definition: cfftypes.h:224
FT_Byte num_other_blues
Definition: cfftypes.h:154
FT_UShort * sids
Definition: cfftypes.h:96
FT_UInt format
Definition: cfftypes.h:93
unsigned short FT_UShort
Definition: fttypes.h:205
FT_Pos standard_height
Definition: cfftypes.h:167
FT_Long cid_font_revision
Definition: cfftypes.h:140
FT_Stream stream
Definition: cfftypes.h:65
FT_Pos nominal_width
Definition: cfftypes.h:181
struct CFF_CharsetRec_ CFF_CharsetRec
FT_UInt data_size
Definition: cfftypes.h:193
FT_UInt cid_registry
Definition: cfftypes.h:135
FT_Generic cf2_instance
Definition: cfftypes.h:274
CFF_CharsetRec charset
Definition: cfftypes.h:237
FT_UInt range_count
Definition: cfftypes.h:189
FT_BEGIN_HEADER struct CFF_IndexRec_ * CFF_Index