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 ******************************************************************/
28 /***********************************************************************/
30 /* TrueType Table Types */
32 /***********************************************************************/
34 /* TrueType Collection Header */
41 PULong TableDirectory
;
44 typedef struct TTTCHeader_ TTTCHeader
;
45 typedef TTTCHeader
* PTTCHeader
;
48 /* TrueType Table Directory type */
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
;
82 UShort tableVersionNumber
;
86 typedef struct TCMapDir_ TCMapDir
;
87 typedef TCMapDir
* PCMapDir
;
92 UShort platformEncodingID
;
96 typedef struct TCMapDirEntry_ TCMapDirEntry
;
97 typedef TCMapDirEntry
* PCMapDirEntries
;
100 /* 'maxp' Maximum Profiles table */
109 maxCompositeContours
,
116 maxSizeOfInstructions
,
117 maxComponentElements
,
121 typedef struct TMaxProfile_ TMaxProfile
;
122 typedef TMaxProfile
* PMaxProfile
;
127 #define GASP_GRIDFIT 0x01
128 #define GASP_DOGRAY 0x02
136 typedef struct GaspRange_ GaspRange
;
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" */
161 typedef struct TLongMetrics_ TLongMetrics
, *PLongMetrics
;
163 typedef Short TShortMetrics
, *PShortMetrics
;
165 /* 'loca' location table type */
173 typedef struct TLoca_ TLoca
;
187 /* this last field is not defined in the spec */
188 /* but used by the FreeType engine */
193 typedef struct TNameRec_ TNameRec
;
199 UShort numNameRecords
;
200 UShort storageOffset
;
205 typedef struct TName_Table_ TName_Table
;
212 #endif /* TTTABLES_H */