-/* GDEF */
-typedef struct
-{
- OTF_Fixed Version;
- OTF_Offset GlyphClassDef;
- OTF_Offset AttachList;
- OTF_Offset LigCaretList;
- OTF_Offset MarkAttachClassDef;
-} OTF_GDEFHeader;
-
-enum OTF_GlyphClassDef
- {
- OTF_GlyphClass0 = 0,
- OTF_GlyphClassBase = 1,
- OTF_GlyphClassLigature = 2,
- OTF_GlyphClassMark = 3,
- OTF_GlyphClassComponent = 4
- };
-
-typedef struct
-{
- OTF_Offset offset;
- unsigned PointCount;
- unsigned *PointIndex;
-} OTF_AttachPoint;
-
-typedef struct
-{
- OTF_Coverage Coverage;
- unsigned GlyphCount;
- OTF_AttachPoint *AttachPoint;
-} OTF_AttachList;
-
-typedef struct
-{
- OTF_Offset offset;
- unsigned CaretValueFormat; /* 1, 2, or 3 */
- union {
- union {
- int Coordinate;
- } f1;
- union {
- unsigned CaretValuePoint;
- } f2;
- union {
- int Coordinate;
- OTF_DeviceTable DeviceTable;
- } f3;
- } f;
-} OTF_CaretValue;
-
-typedef struct
-{
- OTF_Offset offset;
- unsigned CaretCount;
- OTF_CaretValue *CaretValue;
-} OTF_LigGlyph;
-
-typedef struct
-{
- OTF_Coverage Coverage;
- unsigned LigGlyphCount;
- OTF_LigGlyph *LigGlyph;
-} OTF_LigCaretList;
-
-typedef struct
-{
- OTF_GDEFHeader header;
- OTF_ClassDef glyph_class_def;
- OTF_AttachList attach_list;
- OTF_LigCaretList lig_caret_list;
- OTF_ClassDef mark_attach_class_def;
-} OTF_GDEF;
-
-\f
-
-/* cmap */
-
-typedef struct
-{
- unsigned char glyphIdArray[256];
-} OTF_EncodingSubtable0;
-
-typedef struct
-{
- unsigned firstCode;
- unsigned entryCount;
- int idDelta;
- unsigned idRangeOffset;
-} OTF_cmapSubHeader;
-
-typedef struct
-{
- unsigned subHeaderKeys[256];
- OTF_cmapSubHeader *subHeaders;
- unsigned *glyphIndexArray;
-} OTF_EncodingSubtable2;
-
-typedef struct
-{
- unsigned startCount;
- unsigned endCount;
- int idDelta;
- unsigned idRangeOffset;
-} OTF_cmapSegument;
-
-typedef struct
-{
- unsigned segCountX2;
- unsigned searchRange;
- unsigned entrySelector;
- unsigned rangeShift;
- OTF_cmapSegument *segments;
- int GlyphCount;
- unsigned *glyphIdArray;
-} OTF_EncodingSubtable4;
-
-typedef struct
-{
- unsigned firstCode;
- unsigned entryCount;
- unsigned *glyphIdArray;
-} OTF_EncodingSubtable6;
-
-typedef struct
-{
- unsigned startCharCode;
- unsigned endCharCode;
- unsigned startGlyphID;
-} OTF_cmapGroup;
-
-typedef struct
-{
- unsigned char is32[8192];
- unsigned nGroups;
- OTF_cmapGroup *Groups;
-} OTF_EncodingSubtable8;
-
-typedef struct
-{
- unsigned startCharCode;
- unsigned numChars;
- unsigned *glyphs;
-} OTF_EncodingSubtable10;
-
-typedef struct
-{
- unsigned nGroups;
- OTF_cmapGroup *Groups;
-} OTF_EncodingSubtable12;
-
-typedef struct
-{
- unsigned format;
- unsigned length;
- unsigned language;
- union {
- OTF_EncodingSubtable0 *f0;
- OTF_EncodingSubtable2 *f2;
- OTF_EncodingSubtable4 *f4;
- OTF_EncodingSubtable6 *f6;
- OTF_EncodingSubtable8 *f8;
- OTF_EncodingSubtable10 *f10;
- OTF_EncodingSubtable12 *f12;
- }f;
-} OTF_EncodingSubtable;
-
-typedef struct
-{
- unsigned platformID;
- unsigned encodingID;
- unsigned offset;
- OTF_EncodingSubtable subtable;
-} OTF_EncodingRecord;
-
-typedef struct
-{
- unsigned version;
- unsigned numTables;
- OTF_EncodingRecord *EncodingRecord;
- OTF_EncodingRecord *Unicode;
-} OTF_cmap;
-
-\f
-/* name */
-typedef struct
-{
- int platformID;
- int encodingID;
- int languageID;
- int nameID;
- int length;
- int offset;
-} OTF_NameRecord;
-
-#define OTF_max_nameID 23
-
-typedef struct
-{
- int format;
- int count;
- int stringOffset;
- OTF_NameRecord *nameRecord;
- char *name[OTF_max_nameID + 1];
-} OTF_name;