All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GlyphLessFont.h
Go to the documentation of this file.
1 /* I don't expect anyone to run this program, ever again. It is
2  * included primarily as documentation for how the GlyphLessFont was
3  * created.
4  */
5 
6 /* The OpenType data types, we'll duplicate the definitions so that
7  * the code shall be (as far as possible) self-documenting simply by
8  * referencing the OpenType specification. Note that the specification
9  * is soemwhat inconsistent with regards to usage, naming and capitalisation
10  * of the names for these data types.
11  */
12 typedef char BYTE;
13 typedef char CHAR;
14 typedef unsigned short USHORT;
15 typedef short SHORT;
16 typedef struct _uint24 {char top8;unsigned short bottom16;} UINT24;
17 typedef unsigned long ULONG;
18 typedef long LONG;
19 typedef unsigned long Fixed;
20 typedef SHORT FWORD;
21 typedef USHORT UFWORD;
22 typedef unsigned short F2DOT14;
23 typedef struct _datetime {long upper;long lower;} LONGDATETIME;
24 typedef char Tag[4];
25 typedef USHORT GlyphId;
26 typedef USHORT Offset;
28 
29 /* And now definitions for each of the OpenType tables we will wish to use */
30 
31 typedef struct {
37 } Offset_Table;
38 
39 typedef struct {
40  Tag tag; /* The spec defines this as a ULONG,
41  but also as a 'Tag' in its own right */
45 } TableRecord;
46 
47 typedef struct {
50 } cmap_header;
51 
52 typedef struct {
56 } cmap_record;
57 
58 typedef struct {
62  BYTE glyphIDArray[256];
64 
65 /* This structure only works for single segment format 4 tables,
66  for multiple segments it must be constructed */
67 typedef struct {
80  USHORT glyphIdArray[2];
82 
83 typedef struct {
91 
92 typedef struct {
94  cmap_record records[2];
97 } cmap_table;
98 
99 typedef struct {
118 } head_table;
119 
120 typedef struct {
138 } hhea_table;
139 
140 typedef struct {
141  longHorMetric hMetrics[2];
142 } hmtx_table;
143 
144 typedef struct {
160 } maxp_table;
161 
162 typedef struct {
169 } NameRecord;
170 
171 typedef struct {
175  NameRecord nameRecord[3];
176 } name_table;
177 
178 typedef struct {
195  BYTE panose[10];
200  CHAR achVendID[4];
216 } OS2_table;
217 
218 typedef struct {
228 } post_table;
ULONG ulUnicodeRange2
USHORT fsType
SHORT FontDirectionHint
char CHAR
Definition: GlyphLessFont.h:13
SHORT ySuperscriptXOffset
FWORD xMaxExtent
USHORT format
SHORT reserved4
USHORT numTables
Definition: GlyphLessFont.h:49
USHORT usWidthClass
SHORT ySuperscriptXSize
ULONG isFixedPitch
SHORT FWORD
Definition: GlyphLessFont.h:20
USHORT usWeightClass
short SHORT
Definition: GlyphLessFont.h:15
SHORT sTypoAscender
USHORT usWinDescent
USHORT UFWORD
Definition: GlyphLessFont.h:21
SHORT sTypoLineGap
char Tag[4]
Definition: GlyphLessFont.h:24
format6_cmap_table MSTable
Definition: GlyphLessFont.h:96
SHORT ySuperscriptYSize
SHORT yStrikeoutSize
ULONG maxMemType42
unsigned long Fixed
Definition: GlyphLessFont.h:19
USHORT Flags
SHORT caretOffset
Fixed italicAngle
FWORD underlinePosition
USHORT usLastCharIndex
USHORT entrySelector
Definition: GlyphLessFont.h:35
USHORT maxComponentDepth
FWORD Ascender
USHORT maxTwilightPoints
unsigned short USHORT
Definition: GlyphLessFont.h:14
USHORT version
USHORT usBreakChar
SHORT sTypoDescender
USHORT maxCompositePoints
unsigned short bottom16
Definition: GlyphLessFont.h:16
USHORT fsSelection
SHORT caretSlopeRun
FWORD minLeftSideBearing
SHORT metricDataFormat
ULONG minMemType1
SHORT ySubscriptYOffset
ULONG minMemType42
char BYTE
Definition: GlyphLessFont.h:12
Fixed sfnt_version
Definition: GlyphLessFont.h:32
ULONG ulUnicodeRange1
USHORT unitsPerEm
ULONG ulUnicodeRange3
USHORT GlyphId
Definition: GlyphLessFont.h:25
char top8
Definition: GlyphLessFont.h:16
ULONG ulCodePageRange1
USHORT numberOfHMetrics
LONGDATETIME created
USHORT rangeShift
Definition: GlyphLessFont.h:36
SHORT sCapHeight
ULONG MagicNumber
USHORT maxStackElements
unsigned short F2DOT14
Definition: GlyphLessFont.h:22
USHORT usWinAscent
ULONG checkSum
Definition: GlyphLessFont.h:42
ULONG checkSumAdjustment
USHORT lowestRecPPEM
SHORT reserved2
USHORT maxInstructionDefs
USHORT macStyle
SHORT sxHeight
USHORT maxComponentElements
FWORD minRightSideBearing
FWORD underlineThickness
USHORT encodingID
FWORD Descender
USHORT version
Definition: GlyphLessFont.h:48
SHORT ySubscriptYSize
SHORT reserved1
USHORT maxCompositeContours
USHORT platformID
Definition: GlyphLessFont.h:53
USHORT offset
USHORT languageID
USHORT nameID
UFWORD advanceWidthMax
USHORT searchRange
Definition: GlyphLessFont.h:34
SHORT ySubscriptXOffset
USHORT maxZones
USHORT usDefaultChar
SHORT ySubscriptXSize
USHORT usFirstCharIndex
long LONG
Definition: GlyphLessFont.h:18
SHORT ySuperscriptYOffset
USHORT maxFunctionDefs
USHORT numGlyphs
struct _datetime LONGDATETIME
ULONG ulCodePageRange2
USHORT numTables
Definition: GlyphLessFont.h:33
USHORT stringOffset
USHORT encodingID
Definition: GlyphLessFont.h:54
SHORT sFamilyClass
USHORT Offset
Definition: GlyphLessFont.h:26
USHORT length
cmap_header header
Definition: GlyphLessFont.h:93
SHORT caretSlopeRise
struct _uint24 UINT24
Fixed FontRevision
SHORT xAvgCharWidth
SHORT glyphDataFormat
SHORT reserved3
USHORT count
SHORT indexToLocFormat
USHORT platformID
format6_cmap_table AppleTable
Definition: GlyphLessFont.h:95
USHORT maxContours
ULONG ulUnicodeRange4
LONGDATETIME modified
USHORT usMaxContent
struct _longHorMetric longHorMetric
unsigned long ULONG
Definition: GlyphLessFont.h:17
ULONG maxMemType1
USHORT maxSizeOfInstructions
USHORT maxStorage
SHORT yStrikeoutPosition
USHORT advanceWidth
Definition: GlyphLessFont.h:27
USHORT maxPoints