tesseract  3.04.00
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;
27 typedef struct _longHorMetric {USHORT advanceWidth;SHORT lsb;} longHorMetric;
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;
char top8
Definition: GlyphLessFont.h:16
USHORT Offset
Definition: GlyphLessFont.h:26
SHORT ySuperscriptXOffset
struct _uint24 UINT24
SHORT reserved2
USHORT usWidthClass
SHORT yStrikeoutPosition
SHORT metricDataFormat
ULONG MagicNumber
unsigned long Fixed
Definition: GlyphLessFont.h:19
USHORT usWeightClass
USHORT length
ULONG ulUnicodeRange2
ULONG checkSum
Definition: GlyphLessFont.h:42
FWORD minRightSideBearing
SHORT sTypoDescender
FWORD Descender
Fixed FontRevision
unsigned short USHORT
Definition: GlyphLessFont.h:14
SHORT xAvgCharWidth
USHORT maxZones
struct _longHorMetric longHorMetric
USHORT count
USHORT unitsPerEm
ULONG ulUnicodeRange4
USHORT stringOffset
SHORT caretOffset
ULONG ulCodePageRange1
format6_cmap_table MSTable
Definition: GlyphLessFont.h:96
char CHAR
Definition: GlyphLessFont.h:13
SHORT yStrikeoutSize
USHORT version
USHORT lowestRecPPEM
USHORT numGlyphs
SHORT FontDirectionHint
unsigned short F2DOT14
Definition: GlyphLessFont.h:22
USHORT numTables
Definition: GlyphLessFont.h:49
SHORT ySuperscriptXSize
SHORT ySubscriptYOffset
USHORT macStyle
USHORT maxFunctionDefs
USHORT maxContours
UFWORD advanceWidthMax
USHORT usBreakChar
SHORT sTypoAscender
USHORT maxCompositePoints
ULONG maxMemType1
USHORT entrySelector
Definition: GlyphLessFont.h:35
SHORT ySubscriptYSize
SHORT ySuperscriptYSize
ULONG ulUnicodeRange1
USHORT languageID
USHORT format
USHORT usLastCharIndex
SHORT sCapHeight
SHORT sxHeight
USHORT usFirstCharIndex
ULONG isFixedPitch
USHORT maxPoints
USHORT maxCompositeContours
USHORT maxComponentElements
USHORT encodingID
Definition: GlyphLessFont.h:54
LONGDATETIME modified
ULONG ulCodePageRange2
char BYTE
Definition: GlyphLessFont.h:12
long LONG
Definition: GlyphLessFont.h:18
USHORT fsSelection
USHORT maxComponentDepth
USHORT GlyphId
Definition: GlyphLessFont.h:25
USHORT maxTwilightPoints
SHORT reserved1
cmap_header header
Definition: GlyphLessFont.h:93
ULONG ulUnicodeRange3
USHORT Flags
Fixed italicAngle
LONGDATETIME created
USHORT version
Definition: GlyphLessFont.h:48
SHORT glyphDataFormat
SHORT ySubscriptXSize
USHORT maxStackElements
SHORT indexToLocFormat
USHORT platformID
format6_cmap_table AppleTable
Definition: GlyphLessFont.h:95
USHORT usWinAscent
USHORT searchRange
Definition: GlyphLessFont.h:34
USHORT offset
unsigned short bottom16
Definition: GlyphLessFont.h:16
USHORT numberOfHMetrics
USHORT maxInstructionDefs
USHORT platformID
Definition: GlyphLessFont.h:53
USHORT maxSizeOfInstructions
USHORT rangeShift
Definition: GlyphLessFont.h:36
ULONG minMemType42
unsigned long ULONG
Definition: GlyphLessFont.h:17
Fixed sfnt_version
Definition: GlyphLessFont.h:32
USHORT fsType
FWORD underlineThickness
USHORT maxStorage
USHORT encodingID
FWORD xMaxExtent
FWORD underlinePosition
SHORT reserved4
SHORT sFamilyClass
SHORT caretSlopeRun
FWORD minLeftSideBearing
SHORT reserved3
SHORT caretSlopeRise
ULONG checkSumAdjustment
USHORT nameID
USHORT usMaxContent
SHORT ySubscriptXOffset
SHORT FWORD
Definition: GlyphLessFont.h:20
USHORT usWinDescent
SHORT sTypoLineGap
FWORD Ascender
struct _datetime LONGDATETIME
short SHORT
Definition: GlyphLessFont.h:15
USHORT usDefaultChar
ULONG minMemType1
USHORT UFWORD
Definition: GlyphLessFont.h:21
SHORT ySuperscriptYOffset
ULONG maxMemType42
char Tag[4]
Definition: GlyphLessFont.h:24
USHORT numTables
Definition: GlyphLessFont.h:33