contrib/OWB: add correct SDL dependency, fix compilers used
[AROS-Contrib.git] / freetype1 / lib / tttables.h
blobe3556fc18a261868d481806999e8701333c54c59
1 /*******************************************************************
3 * tttables.h 1.1
5 * TrueType Tables structures and handling (specification).
7 * Copyright 1996-1999 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 ******************************************************************/
18 #ifndef TTTABLES_H
19 #define TTTABLES_H
21 #include "ttconfig.h"
22 #include "tttypes.h"
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 /***********************************************************************/
29 /* */
30 /* TrueType Table Types */
31 /* */
32 /***********************************************************************/
34 /* TrueType Collection Header */
36 struct TTTCHeader_
38 ULong Tag;
39 TT_Fixed version;
40 ULong DirCount;
41 PULong TableDirectory;
44 typedef struct TTTCHeader_ TTTCHeader;
45 typedef TTTCHeader* PTTCHeader;
48 /* TrueType Table Directory type */
50 struct TTableDir_
52 TT_Fixed version; /* should be 0x10000 */
53 UShort numTables; /* number of tables */
55 UShort searchRange; /* These parameters are only used */
56 UShort entrySelector; /* for a dichotomy search in the */
57 UShort rangeShift; /* directory. We ignore them. */
60 typedef struct TTableDir_ TTableDir;
61 typedef TTableDir* PTableDir;
64 /* The 'TableDir' is followed by 'numTables' TableDirEntries */
66 struct TTableDirEntry_
68 ULong Tag; /* table type */
69 ULong CheckSum; /* table checksum */
70 ULong Offset; /* table file offset */
71 ULong Length; /* table length */
74 typedef struct TTableDirEntry_ TTableDirEntry;
75 typedef TTableDirEntry* PTableDirEntry;
78 /* 'cmap' tables */
80 struct TCMapDir_
82 UShort tableVersionNumber;
83 UShort numCMaps;
86 typedef struct TCMapDir_ TCMapDir;
87 typedef TCMapDir* PCMapDir;
89 struct TCMapDirEntry_
91 UShort platformID;
92 UShort platformEncodingID;
93 Long offset;
96 typedef struct TCMapDirEntry_ TCMapDirEntry;
97 typedef TCMapDirEntry* PCMapDirEntries;
100 /* 'maxp' Maximum Profiles table */
102 struct TMaxProfile_
104 TT_Fixed version;
105 UShort numGlyphs,
106 maxPoints,
107 maxContours,
108 maxCompositePoints,
109 maxCompositeContours,
110 maxZones,
111 maxTwilightPoints,
112 maxStorage,
113 maxFunctionDefs,
114 maxInstructionDefs,
115 maxStackElements,
116 maxSizeOfInstructions,
117 maxComponentElements,
118 maxComponentDepth;
121 typedef struct TMaxProfile_ TMaxProfile;
122 typedef TMaxProfile* PMaxProfile;
125 /* table "gasp" */
127 #define GASP_GRIDFIT 0x01
128 #define GASP_DOGRAY 0x02
130 struct GaspRange_
132 UShort maxPPEM;
133 UShort gaspFlag;
136 typedef struct GaspRange_ GaspRange;
139 struct TGasp_
141 UShort version;
142 UShort numRanges;
143 GaspRange* gaspRanges;
146 typedef struct TGasp_ TGasp;
149 /* table "head" - now defined in freetype.h */
150 /* table "hhea" - now defined in freetype.h */
153 /* tables "HMTX" and "VMTX" */
155 struct TLongMetrics_
157 UShort advance;
158 Short bearing;
161 typedef struct TLongMetrics_ TLongMetrics, *PLongMetrics;
163 typedef Short TShortMetrics, *PShortMetrics;
165 /* 'loca' location table type */
167 struct TLoca_
169 UShort Size;
170 PStorage Table;
173 typedef struct TLoca_ TLoca;
176 /* table "name" */
178 struct TNameRec_
180 UShort platformID;
181 UShort encodingID;
182 UShort languageID;
183 UShort nameID;
184 UShort stringLength;
185 UShort stringOffset;
187 /* this last field is not defined in the spec */
188 /* but used by the FreeType engine */
190 PByte string;
193 typedef struct TNameRec_ TNameRec;
196 struct TName_Table_
198 UShort format;
199 UShort numNameRecords;
200 UShort storageOffset;
201 TNameRec* names;
202 PByte storage;
205 typedef struct TName_Table_ TName_Table;
208 #ifdef __cplusplus
210 #endif
212 #endif /* TTTABLES_H */
215 /* END */