w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

sfnt.h
Go to the documentation of this file.
1 /*
2  ******************************************************************************
3  *
4  * © 2016 and later: Unicode, Inc. and others.
5  * License & terms of use: http://www.unicode.org/copyright.html
6  *
7  ******************************************************************************
8  ****************************************************************************** *
9  *
10  * Copyright (C) 1999-2001, International Business Machines
11  * Corporation and others. All Rights Reserved.
12  *
13  ****************************************************************************** *
14  * file name: sfnt.h
15  *
16  * created on: ??/??/2001
17  * created by: Eric R. Mader
18  */
19 
20 #ifndef __SFNT_H
21 #define __SFNT_H
22 
23 #include "LETypes.h"
24 
25 
26 #ifndef ANY_NUMBER
27 #define ANY_NUMBER 1
28 #endif
29 
31 {
32  le_uint32 tag;
33  le_uint32 checksum;
34  le_uint32 offset;
35  le_uint32 length;
36 };
37 
39 {
40  le_uint32 scalerType;
41  le_uint16 numTables;
42  le_uint16 searchRange;
43  le_uint16 entrySelector;
44  le_uint16 rangeShift;
46 };
47 
48 
50 {
51  le_uint16 platformID;
52  le_uint16 platformSpecificID;
53  le_uint32 encodingOffset;
54 };
55 
56 struct CMAPTable
57 {
58  le_uint16 version;
59  le_uint16 numberSubtables;
61 };
62 
64 {
65  le_uint16 format;
66  le_uint16 length;
67  le_uint16 language;
68 };
69 
71 {
72  le_uint8 glyphIndexArray[256];
73 };
74 
76 {
77  le_uint16 firstCode;
78  le_uint16 entryCount;
79  le_int16 idDelta;
80  le_uint16 idRangeOffset;
81 };
82 
84 {
85  le_uint16 subHeadKeys[256];
87 };
88 
90 {
91  le_uint16 segCountX2;
92  le_uint16 searchRange;
93  le_uint16 entrySelector;
94  le_uint16 rangeShift;
95  le_uint16 endCodes[ANY_NUMBER];
96 // le_uint16 reservedPad;
97 // le_uint16 startCodes[ANY_NUMBER];
98 // le_uint16 idDelta[ANY_NUMBER];
99 // le_uint16 idRangeOffset[ANY_NUMBER];
100 // le_uint16 glyphIndexArray[ANY_NUMBER];
101 };
102 
104 {
105  le_uint16 firstCode;
106  le_uint16 entryCount;
108 };
109 
111 {
112  le_uint32 format;
113  le_uint32 length;
114  le_uint32 language;
115 };
116 
117 struct CMAPGroup
118 {
119  le_uint32 startCharCode;
120  le_uint32 endCharCode;
121  le_uint32 startGlyphCode;
122 };
123 
125 {
126  le_uint32 is32[65536/32];
127  le_uint32 nGroups;
129 };
130 
132 {
133  le_uint32 startCharCode;
134  le_uint32 numCharCodes;
135  le_uint16 glyphs[ANY_NUMBER];
136 };
137 
139 {
140  le_uint32 nGroups;
142 };
143 
144 typedef le_int32 fixed;
145 
146 struct BigDate
147 {
148  le_uint32 bc;
149  le_uint32 ad;
150 };
151 
152 struct HEADTable
153 {
157  le_uint32 magicNumber;
158  le_uint16 flags;
159  le_uint16 unitsPerEm;
162  le_int16 xMin;
163  le_int16 yMin;
164  le_int16 xMax;
165  le_int16 yMax;
166  le_int16 lowestRecPPEM;
169  le_int16 glyphDataFormat;
170 };
171 
172 struct MAXPTable
173 {
175  le_uint16 numGlyphs;
176  le_uint16 maxPoints;
177  le_uint16 maxContours;
180  le_uint16 maxZones;
181  le_uint16 maxTwilightPoints;
182  le_uint16 maxStorage;
183  le_uint16 maxFunctionDefs;
185  le_uint16 maxStackElements;
188  le_uint16 maxComponentDepth;
189 };
190 
191 struct HHEATable
192 {
194  le_int16 ascent;
195  le_int16 descent;
196  le_int16 lineGap;
197  le_uint16 advanceWidthMax;
200  le_int16 xMaxExtent;
201  le_int16 caretSlopeRise;
202  le_int16 caretSlopeRun;
203  le_int16 caretOffset;
204  le_int16 reserved1;
205  le_int16 reserved2;
206  le_int16 reserved3;
207  le_int16 reserved4;
210 };
211 
213 {
214  le_uint16 advanceWidth;
215  le_int16 leftSideBearing;
216 };
217 
218 struct HMTXTable
219 {
220  LongHorMetric hMetrics[ANY_NUMBER]; // ANY_NUMBER = numOfLongHorMetrics from hhea table
221 // le_int16 leftSideBearing[ANY_NUMBER]; // ANY_NUMBER = numGlyphs - numOfLongHorMetrics
222 };
223 
224 #endif
225 
le_int32 fixed
Definition: sfnt.h:144
#define ANY_NUMBER
Definition: sfnt.h:27
Definition: sfnt.h:147
le_uint32 bc
Definition: sfnt.h:148
le_uint32 ad
Definition: sfnt.h:149
le_uint32 language
Definition: sfnt.h:114
le_uint32 format
Definition: sfnt.h:112
le_uint32 length
Definition: sfnt.h:113
le_uint16 platformSpecificID
Definition: sfnt.h:52
le_uint32 encodingOffset
Definition: sfnt.h:53
le_uint16 platformID
Definition: sfnt.h:51
le_uint16 format
Definition: sfnt.h:65
le_uint16 length
Definition: sfnt.h:66
le_uint16 language
Definition: sfnt.h:67
le_uint8 glyphIndexArray[256]
Definition: sfnt.h:72
le_uint32 numCharCodes
Definition: sfnt.h:134
le_uint32 startCharCode
Definition: sfnt.h:133
le_uint16 glyphs[1]
Definition: sfnt.h:135
le_uint32 nGroups
Definition: sfnt.h:140
CMAPGroup groups[1]
Definition: sfnt.h:141
le_uint16 subHeadKeys[256]
Definition: sfnt.h:85
CMAPFormat2Subheader subheaders[1]
Definition: sfnt.h:86
le_uint16 idRangeOffset
Definition: sfnt.h:80
le_int16 idDelta
Definition: sfnt.h:79
le_uint16 firstCode
Definition: sfnt.h:77
le_uint16 entryCount
Definition: sfnt.h:78
le_uint16 rangeShift
Definition: sfnt.h:94
le_uint16 searchRange
Definition: sfnt.h:92
le_uint16 entrySelector
Definition: sfnt.h:93
le_uint16 endCodes[1]
Definition: sfnt.h:95
le_uint16 segCountX2
Definition: sfnt.h:91
le_uint16 entryCount
Definition: sfnt.h:106
le_uint16 firstCode
Definition: sfnt.h:105
le_uint16 glyphIndexArray[1]
Definition: sfnt.h:107
le_uint32 nGroups
Definition: sfnt.h:127
le_uint32 is32[65536/32]
Definition: sfnt.h:126
CMAPGroup groups[1]
Definition: sfnt.h:128
le_uint32 startGlyphCode
Definition: sfnt.h:121
le_uint32 endCharCode
Definition: sfnt.h:120
le_uint32 startCharCode
Definition: sfnt.h:119
Definition: sfnt.h:57
le_uint16 numberSubtables
Definition: sfnt.h:59
CMAPEncodingSubtableHeader encodingSubtableHeaders[1]
Definition: sfnt.h:60
le_uint16 version
Definition: sfnt.h:58
le_uint32 offset
Definition: sfnt.h:34
le_uint32 tag
Definition: sfnt.h:32
le_uint32 checksum
Definition: sfnt.h:33
le_uint32 length
Definition: sfnt.h:35
BigDate created
Definition: sfnt.h:160
le_uint16 unitsPerEm
Definition: sfnt.h:159
le_uint32 checksumAdjustment
Definition: sfnt.h:156
le_int16 xMax
Definition: sfnt.h:164
le_int16 yMin
Definition: sfnt.h:163
le_uint16 flags
Definition: sfnt.h:158
le_int16 fontDirectionHint
Definition: sfnt.h:167
fixed fontRevision
Definition: sfnt.h:155
le_int16 yMax
Definition: sfnt.h:165
le_int16 xMin
Definition: sfnt.h:162
fixed version
Definition: sfnt.h:154
le_int16 indexToLocFormat
Definition: sfnt.h:168
BigDate modified
Definition: sfnt.h:161
le_int16 lowestRecPPEM
Definition: sfnt.h:166
le_uint32 magicNumber
Definition: sfnt.h:157
le_int16 glyphDataFormat
Definition: sfnt.h:169
le_uint16 advanceWidthMax
Definition: sfnt.h:197
le_int16 xMaxExtent
Definition: sfnt.h:200
le_int16 reserved1
Definition: sfnt.h:204
le_int16 lineGap
Definition: sfnt.h:196
le_int16 metricDataFormat
Definition: sfnt.h:208
le_int16 caretSlopeRise
Definition: sfnt.h:201
le_int16 descent
Definition: sfnt.h:195
le_uint16 numOfLongHorMetrics
Definition: sfnt.h:209
le_int16 reserved2
Definition: sfnt.h:205
le_int16 ascent
Definition: sfnt.h:194
le_int16 reserved3
Definition: sfnt.h:206
le_int16 minLeftSideBearing
Definition: sfnt.h:198
le_int16 minRightSideBearing
Definition: sfnt.h:199
le_int16 caretOffset
Definition: sfnt.h:203
le_int16 caretSlopeRun
Definition: sfnt.h:202
fixed version
Definition: sfnt.h:193
le_int16 reserved4
Definition: sfnt.h:207
LongHorMetric hMetrics[1]
Definition: sfnt.h:220
le_uint16 advanceWidth
Definition: sfnt.h:214
le_int16 leftSideBearing
Definition: sfnt.h:215
le_uint16 maxComponentPoints
Definition: sfnt.h:178
le_uint16 numGlyphs
Definition: sfnt.h:175
fixed version
Definition: sfnt.h:174
le_uint16 maxContours
Definition: sfnt.h:177
le_uint16 maxInstructionDefs
Definition: sfnt.h:184
le_uint16 maxSizeOfInstructions
Definition: sfnt.h:186
le_uint16 maxStackElements
Definition: sfnt.h:185
le_uint16 maxStorage
Definition: sfnt.h:182
le_uint16 maxComponentElements
Definition: sfnt.h:187
le_uint16 maxTwilightPoints
Definition: sfnt.h:181
le_uint16 maxZones
Definition: sfnt.h:180
le_uint16 maxFunctionDefs
Definition: sfnt.h:183
le_uint16 maxPoints
Definition: sfnt.h:176
le_uint16 maxComponentDepth
Definition: sfnt.h:188
le_uint16 maxComponentContours
Definition: sfnt.h:179
le_uint32 scalerType
Definition: sfnt.h:40
le_uint16 rangeShift
Definition: sfnt.h:44
le_uint16 numTables
Definition: sfnt.h:41
DirectoryEntry tableDirectory[1]
Definition: sfnt.h:45
le_uint16 searchRange
Definition: sfnt.h:42
le_uint16 entrySelector
Definition: sfnt.h:43