1
/*******************************************************************
5
* TrueType Open support.
7
* Copyright 1996-2000 by
8
* David Turner, Robert Wilhelm, and Werner Lemberg.
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.
16
* This file should be included by the application. Nevertheless,
17
* the table specific APIs (and structures) are located in files like
18
* ftxgsub.h or ftxgpos.h; these header files are read by ftxopen.h .
20
******************************************************************/
26
#include FT_FREETYPE_H
39
#define TTO_MAX_NESTING_LEVEL 100
41
#define TTO_Err_Invalid_SubTable_Format 0x1000
42
#define TTO_Err_Invalid_SubTable 0x1001
43
#define TTO_Err_Not_Covered 0x1002
44
#define TTO_Err_Too_Many_Nested_Contexts 0x1003
45
#define TTO_Err_No_MM_Interpreter 0x1004
48
/* Script list related structures */
52
FT_UShort LookupOrderOffset; /* always 0 for TT Open 1.0 */
53
FT_UShort ReqFeatureIndex; /* required FeatureIndex */
54
FT_UShort FeatureCount; /* number of Feature indices */
55
FT_UShort* FeatureIndex; /* array of Feature indices */
58
typedef struct TTO_LangSys_ TTO_LangSys;
61
struct TTO_LangSysRecord_
63
FT_ULong LangSysTag; /* LangSysTag identifier */
64
TTO_LangSys LangSys; /* LangSys table */
67
typedef struct TTO_LangSysRecord_ TTO_LangSysRecord;
72
TTO_LangSys DefaultLangSys; /* DefaultLangSys table */
73
FT_UShort LangSysCount; /* number of LangSysRecords */
74
TTO_LangSysRecord* LangSysRecord; /* array of LangSysRecords */
77
typedef struct TTO_Script_ TTO_Script;
80
struct TTO_ScriptRecord_
82
FT_ULong ScriptTag; /* ScriptTag identifier */
83
TTO_Script Script; /* Script table */
86
typedef struct TTO_ScriptRecord_ TTO_ScriptRecord;
89
struct TTO_ScriptList_
91
FT_UShort ScriptCount; /* number of ScriptRecords */
92
TTO_ScriptRecord* ScriptRecord; /* array of ScriptRecords */
95
typedef struct TTO_ScriptList_ TTO_ScriptList;
98
/* Feature list related structures */
102
FT_UShort FeatureParams; /* always 0 for TT Open 1.0 */
103
FT_UShort LookupListCount; /* number of LookupList indices */
104
FT_UShort* LookupListIndex; /* array of LookupList indices */
107
typedef struct TTO_Feature_ TTO_Feature;
110
struct TTO_FeatureRecord_
112
FT_ULong FeatureTag; /* FeatureTag identifier */
113
TTO_Feature Feature; /* Feature table */
116
typedef struct TTO_FeatureRecord_ TTO_FeatureRecord;
119
struct TTO_FeatureList_
121
FT_UShort FeatureCount; /* number of FeatureRecords */
122
TTO_FeatureRecord* FeatureRecord; /* array of FeatureRecords */
125
typedef struct TTO_FeatureList_ TTO_FeatureList;
128
/* Lookup list related structures */
130
struct TTO_SubTable_; /* defined below after inclusion
131
of ftxgsub.h and ftxgpos.h */
132
typedef struct TTO_SubTable_ TTO_SubTable;
137
FT_UShort LookupType; /* Lookup type */
138
FT_UShort LookupFlag; /* Lookup qualifiers */
139
FT_UShort SubTableCount; /* number of SubTables */
140
TTO_SubTable* SubTable; /* array of SubTables */
143
typedef struct TTO_Lookup_ TTO_Lookup;
146
/* The `Properties' field is not defined in the TTO specification but
147
is needed for processing lookups. If properties[n] is > 0, the
148
functions TT_GSUB_Apply_String() resp. TT_GPOS_Apply_String() will
149
process Lookup[n] for glyphs which have the specific bit not set in
150
the `properties' field of the input string object. */
152
struct TTO_LookupList_
154
FT_UShort LookupCount; /* number of Lookups */
155
TTO_Lookup* Lookup; /* array of Lookup records */
158
typedef struct TTO_LookupList_ TTO_LookupList;
161
/* Possible LookupFlag bit masks. `IGNORE_SPECIAL_MARKS' comes from the
162
OpenType 1.2 specification; RIGHT_TO_LEFT has been (re)introduced in
163
OpenType 1.3 -- if set, the last glyph in a cursive attachment
164
sequence has to be positioned on the baseline -- regardless of the
165
writing direction. */
167
#define RIGHT_TO_LEFT 0x0001
168
#define IGNORE_BASE_GLYPHS 0x0002
169
#define IGNORE_LIGATURES 0x0004
170
#define IGNORE_MARKS 0x0008
171
#define IGNORE_SPECIAL_MARKS 0xFF00
174
struct TTO_CoverageFormat1_
176
FT_UShort GlyphCount; /* number of glyphs in GlyphArray */
177
FT_UShort* GlyphArray; /* array of glyph IDs */
180
typedef struct TTO_CoverageFormat1_ TTO_CoverageFormat1;
183
struct TTO_RangeRecord_
185
FT_UShort Start; /* first glyph ID in the range */
186
FT_UShort End; /* last glyph ID in the range */
187
FT_UShort StartCoverageIndex; /* coverage index of first
188
glyph ID in the range */
191
typedef struct TTO_RangeRecord_ TTO_RangeRecord;
194
struct TTO_CoverageFormat2_
196
FT_UShort RangeCount; /* number of RangeRecords */
197
TTO_RangeRecord* RangeRecord; /* array of RangeRecords */
200
typedef struct TTO_CoverageFormat2_ TTO_CoverageFormat2;
205
FT_UShort CoverageFormat; /* 1 or 2 */
209
TTO_CoverageFormat1 cf1;
210
TTO_CoverageFormat2 cf2;
214
typedef struct TTO_Coverage_ TTO_Coverage;
217
struct TTO_ClassDefFormat1_
219
FT_UShort StartGlyph; /* first glyph ID of the
221
FT_UShort GlyphCount; /* size of the ClassValueArray */
222
FT_UShort* ClassValueArray; /* array of class values */
225
typedef struct TTO_ClassDefFormat1_ TTO_ClassDefFormat1;
228
struct TTO_ClassRangeRecord_
230
FT_UShort Start; /* first glyph ID in the range */
231
FT_UShort End; /* last glyph ID in the range */
232
FT_UShort Class; /* applied to all glyphs in range */
235
typedef struct TTO_ClassRangeRecord_ TTO_ClassRangeRecord;
238
struct TTO_ClassDefFormat2_
240
FT_UShort ClassRangeCount;
241
/* number of ClassRangeRecords */
242
TTO_ClassRangeRecord* ClassRangeRecord;
243
/* array of ClassRangeRecords */
246
typedef struct TTO_ClassDefFormat2_ TTO_ClassDefFormat2;
249
/* The `Defined' field is not defined in the TTO specification but
250
apparently needed for processing fonts like trado.ttf: This font
251
refers to a class which contains not a single element. We map such
252
classes to class 0. */
254
struct TTO_ClassDefinition_
258
FT_Bool* Defined; /* array of Booleans.
259
If Defined[n] is FALSE,
260
class n contains no glyphs. */
261
FT_UShort ClassFormat; /* 1 or 2 */
265
TTO_ClassDefFormat1 cd1;
266
TTO_ClassDefFormat2 cd2;
270
typedef struct TTO_ClassDefinition_ TTO_ClassDefinition;
275
FT_UShort StartSize; /* smallest size to correct */
276
FT_UShort EndSize; /* largest size to correct */
277
FT_UShort DeltaFormat; /* DeltaValue array data format:
279
FT_UShort* DeltaValue; /* array of compressed data */
282
typedef struct TTO_Device_ TTO_Device;
294
TTO_GSUB_SubTable gsub;
295
TTO_GPOS_SubTable gpos;
306
typedef enum TTO_Type_ TTO_Type;
313
#endif /* FTXOPEN_H */