5 /* these definitions are mostly taken from Microsoft's True Type
9 #define BYTE unsigned char
10 #define CHAR signed char
11 #define USHORT unsigned short
12 #define SHORT signed short
13 #define ULONG unsigned int
14 #define LONG signed int
25 #define ARG_1_AND_2_ARE_WORDS 0x0001
26 #define ARGS_ARE_XY_VALUES 0x0002
27 #define XY_BOUND_TO_GRID 0x0004
28 #define WE_HAVE_A_SCALE 0x0008
29 #define MORE_COMPONENTS 0x0020
30 #define WE_HAVE_AN_X_AND_Y_SCALE 0x0040
31 #define WE_HAVE_A_TWO_BY_TWO 0x0080
32 #define WE_HAVE_INSTRUCTIONS 0x0100
33 #define USE_MY_METRICS 0x0200
35 typedef struct short_2 {
40 typedef struct longhormetric {
45 typedef struct ttf_hhea {
47 SHORT ascender, descender, lineGap;
48 USHORT advnaceWidthMax;
49 SHORT minLSB, minRSB, xMaxExtent;
50 SHORT caretSlopeRise, caretSlopeRun;
52 SHORT metricDataFormat;
53 USHORT numberOfHMetrics;
56 typedef struct ttf_dir_entry {
63 typedef struct ttf_directory {
72 typedef struct ttf_name_rec {
81 typedef struct ttf_name {
83 USHORT numberOfNameRecords;
85 TTF_NAME_REC nameRecords;
88 typedef struct ttf_head {
97 FWORD xMin, yMin, xMax, yMax;
98 USHORT macStyle, lowestRecPPEM;
99 SHORT fontDirection, indexToLocFormat, glyphDataFormat;
102 typedef struct ttf_kern {
103 USHORT version, nTables;
106 typedef struct ttf_kern_sub {
107 USHORT version, length, coverage;
108 USHORT nPairs, searchRange, entrySelector, rangeShift;
111 typedef struct ttf_kern_entry {
116 typedef struct ttf_cmap_fmt0 {
120 BYTE glyphIdArray[256];
123 typedef struct ttf_cmap_fmt4 {
129 USHORT entrySelector;
133 typedef struct ttf_cmap_entry {
139 typedef struct ttf_cmap {
141 USHORT numberOfEncodingTables;
142 TTF_CMAP_ENTRY encodingTable[1];
145 typedef struct ttf_glyf {
146 SHORT numberOfContours;
147 FWORD xMin, yMin, xMax, yMax;
150 typedef struct ttf_maxp {
152 USHORT numGlyphs, maxPoints, maxContours;
153 USHORT maxCompositePoints, maxCompositeContours;
154 USHORT maxZones, maxTwilightPoints, maxStorage;
155 USHORT maxFunctionDefs, maxInstructionsDefs;
156 USHORT maxSizeOfInstructions, maxComponentElements;
157 USHORT maxComponentDepth;
160 typedef struct ttf_post_head {
162 TTF2PT1_FIXED italicAngle;
163 FWORD underlinePosition;
164 FWORD underlineThickness;
171 USHORT glyphNameIndex;