('Offset','LangSys',None,None,'Offset to LangSys table-from beginning of Script table'),
]),
('LangSys',[
('Offset','LookupOrder',None,None,'= NULL (reserved for an offset to a reordering table)'),
('uint16','ReqFeatureIndex',None,None,'Index of a feature required for this language system- if no required features = 0xFFFF'),
('uint16','FeatureCount',None,None,'Number of FeatureIndex values for this language system-excludes the required feature'),
('uint16','FeatureIndex','FeatureCount',0,'Array of indices into the FeatureList-in arbitrary order'),
]),
('FeatureList',[
('uint16','FeatureCount',None,None,'Number of FeatureRecords in this table'),
('struct','FeatureRecord','FeatureCount',0,'Array of FeatureRecords-zero-based (first feature has FeatureIndex = 0)-listed alphabetically by FeatureTag'),
('Offset','MarkCoverage',None,None,'Offset to MarkCoverage table-from beginning of MarkBasePos subtable'),
('Offset','BaseCoverage',None,None,'Offset to BaseCoverage table-from beginning of MarkBasePos subtable'),
('uint16','ClassCount',None,None,'Number of classes defined for marks'),
('Offset','MarkArray',None,None,'Offset to MarkArray table-from beginning of MarkBasePos subtable'),
('Offset','BaseArray',None,None,'Offset to BaseArray table-from beginning of MarkBasePos subtable'),
]),
('BaseArray',[
('uint16','BaseCount',None,None,'Number of BaseRecords'),
('struct','BaseRecord','BaseCount',0,'Array of BaseRecords-in order of BaseCoverage Index'),
]),
('BaseRecord',[
('Offset','BaseAnchor','ClassCount',0,'Array of offsets (one per class) to Anchor tables-from beginning of BaseArray table-ordered by class-zero-based'),
('Offset','MarkCoverage',None,None,'Offset to Mark Coverage table-from beginning of MarkLigPos subtable'),
('Offset','LigatureCoverage',None,None,'Offset to Ligature Coverage table-from beginning of MarkLigPos subtable'),
('uint16','ClassCount',None,None,'Number of defined mark classes'),
('Offset','MarkArray',None,None,'Offset to MarkArray table-from beginning of MarkLigPos subtable'),
('Offset','LigatureArray',None,None,'Offset to LigatureArray table-from beginning of MarkLigPos subtable'),
]),
('LigatureArray',[
('uint16','LigatureCount',None,None,'Number of LigatureAttach table offsets'),
('Offset','LigatureAttach','LigatureCount',0,'Array of offsets to LigatureAttach tables-from beginning of LigatureArray table-ordered by LigatureCoverage Index'),
]),
('LigatureAttach',[
('uint16','ComponentCount',None,None,'Number of ComponentRecords in this ligature'),
('struct','ComponentRecord','ComponentCount',0,'Array of Component records-ordered in writing direction'),
]),
('ComponentRecord',[
('Offset','LigatureAnchor','ClassCount',0,'Array of offsets (one per class) to Anchor tables-from beginning of LigatureAttach table-ordered by class-NULL if a component does not have an attachment for a class-zero-based array'),
('Offset','Coverage',None,None,'Offset to Coverage table-from beginning of ContextPos subtable'),
('Offset','ClassDef',None,None,'Offset to ClassDef table-from beginning of ContextPos subtable'),
('uint16','PosClassSetCnt',None,None,'Number of PosClassSet tables'),
('Offset','PosClassSet','PosClassSetCnt',0,'Array of offsets to PosClassSet tables-from beginning of ContextPos subtable-ordered by class-may be NULL'),
]),
('PosClassSet',[
('uint16','PosClassRuleCnt',None,None,'Number of PosClassRule tables'),
('Offset','PosClassRule','PosClassRuleCnt',0,'Array of offsets to PosClassRule tables-from beginning of PosClassSet-ordered by preference'),
]),
('PosClassRule',[
('uint16','GlyphCount',None,None,'Number of glyphs to be matched'),
('uint16','PosCount',None,None,'Number of PosLookupRecords'),
('uint16','Class','GlyphCount',-1,'Array of classes-beginning with the second class-to be matched to the input glyph sequence'),
('struct','PosLookupRecord','PosCount',0,'Array of positioning lookups-in design order'),
('Offset','Coverage',None,None,'Offset to Coverage table-from beginning of ContextPos subtable'),
('uint16','ChainPosRuleSetCount',None,None,'Number of ChainPosRuleSet tables'),
('Offset','ChainPosRuleSet','ChainPosRuleSetCount',0,'Array of offsets to ChainPosRuleSet tables-from beginning of ContextPos subtable-ordered by Coverage Index'),
]),
('ChainPosRuleSet',[
('uint16','ChainPosRuleCount',None,None,'Number of ChainPosRule tables'),
('Offset','ChainPosRule','ChainPosRuleCount',0,'Array of offsets to ChainPosRule tables-from beginning of ChainPosRuleSet-ordered by preference'),
]),
('ChainPosRule',[
('uint16','BacktrackGlyphCount',None,None,'Total number of glyphs in the backtrack sequence (number of glyphs to be matched before the first glyph)'),
('GlyphID','Backtrack','BacktrackGlyphCount',0,"Array of backtracking GlyphID's (to be matched before the input sequence)"),
('uint16','InputGlyphCount',None,None,'Total number of glyphs in the input sequence (includes the first glyph)'),
('GlyphID','Input','InputGlyphCount',-1,'Array of input GlyphIDs (start with second glyph)'),
('uint16','LookaheadGlyphCount',None,None,'Total number of glyphs in the look ahead sequence (number of glyphs to be matched after the input sequence)'),
('GlyphID','LookAhead','LookAheadGlyphCount',0,"Array of lookahead GlyphID's (to be matched after the input sequence)"),
('uint16','PosCount',None,None,'Number of PosLookupRecords'),
('struct','PosLookupRecord','PosCount',0,'Array of PosLookupRecords (in design order)'),
('Offset','Coverage',None,None,'Offset to Coverage table-from beginning of ChainContextPos subtable'),
('Offset','BacktrackClassDef',None,None,'Offset to ClassDef table containing backtrack sequence context-from beginning of ChainContextPos subtable'),
('Offset','InputClassDef',None,None,'Offset to ClassDef table containing input sequence context-from beginning of ChainContextPos subtable'),
('Offset','LookaheadClassDef',None,None,'Offset to ClassDef table containing lookahead sequence context-from beginning of ChainContextPos subtable'),
('uint16','ChainPosClassSetCnt',None,None,'Number of ChainPosClassSet tables'),
('Offset','ChainPosClassSet','ChainPosClassSetCnt',0,'Array of offsets to ChainPosClassSet tables-from beginning of ChainContextPos subtable-ordered by input class-may be NULL'),
]),
('ChainPosClassSet',[
('uint16','ChainPosClassRuleCnt',None,None,'Number of ChainPosClassRule tables'),
('Offset','ChainPosClassRule','ChainPosClassRuleCnt',0,'Array of offsets to ChainPosClassRule tables-from beginning of ChainPosClassSet-ordered by preference'),
]),
('ChainPosClassRule',[
('uint16','BacktrackGlyphCount',None,None,'Total number of glyphs in the backtrack sequence (number of glyphs to be matched before the first glyph)'),
('uint16','Backtrack','BacktrackGlyphCount',0,'Array of backtracking classes(to be matched before the input sequence)'),
('uint16','InputGlyphCount',None,None,'Total number of classes in the input sequence (includes the first class)'),
('uint16','Input','InputGlyphCount',-1,'Array of input classes(start with second class; to be matched with the input glyph sequence)'),
('uint16','LookaheadGlyphCount',None,None,'Total number of classes in the look ahead sequence (number of classes to be matched after the input sequence)'),
('uint16','LookAhead','LookAheadGlyphCount',0,'Array of lookahead classes(to be matched after the input sequence)'),
('uint16','PosCount',None,None,'Number of PosLookupRecords'),
('struct','PosLookupRecord','ChainPosCount',0,'Array of PosLookupRecords (in design order)'),
('uint16','BacktrackGlyphCount',None,None,'Number of glyphs in the backtracking sequence'),
('Offset','BacktrackCoverage','BacktrackGlyphCount',0,'Array of offsets to coverage tables in backtracking sequence, in glyph sequence order'),
('uint16','InputGlyphCount',None,None,'Number of glyphs in input sequence'),
('Offset','InputCoverage','InputGlyphCount',0,'Array of offsets to coverage tables in input sequence, in glyph sequence order'),
('uint16','LookaheadGlyphCount',None,None,'Number of glyphs in lookahead sequence'),
('Offset','LookaheadCoverage','LookaheadGlyphCount',0,'Array of offsets to coverage tables in lookahead sequence, in glyph sequence order'),
('uint16','PosCount',None,None,'Number of PosLookupRecords'),
('struct','PosLookupRecord','PosCount',0,'Array of PosLookupRecords,in design order'),
]),
('ExtensionPosFormat1',[
('USHORT','PosFormat',None,None,'Format identifier. Set to 1.'),
('USHORT','ExtensionLookupType',None,None,'Lookup type of subtable referenced by ExtensionOffset (i.e. the extension subtable).'),
('ULONG','ExtensionOffset',None,None,'Offset to the extension subtable, of lookup type ExtensionLookupType, relative to the start of the ExtensionPosFormat1 subtable.'),
]),
('ValueRecord',[
('int16','XPlacement',None,None,'Horizontal adjustment for placement-in design units'),
('int16','YPlacement',None,None,'Vertical adjustment for placement-in design units'),
('int16','XAdvance',None,None,'Horizontal adjustment for advance-in design units (only used for horizontal writing)'),
('int16','YAdvance',None,None,'Vertical adjustment for advance-in design units (only used for vertical writing)'),
('Offset','XPlaDevice',None,None,'Offset to Device table for horizontal placement-measured from beginning of PosTable (may be NULL)'),
('Offset','YPlaDevice',None,None,'Offset to Device table for vertical placement-measured from beginning of PosTable (may be NULL)'),
('Offset','XAdvDevice',None,None,'Offset to Device table for horizontal advance-measured from beginning of PosTable (may be NULL)'),
('Offset','YAdvDevice',None,None,'Offset to Device table for vertical advance-measured from beginning of PosTable (may be NULL)'),
('Offset','Coverage',None,None,'Offset to Coverage table-from beginning of Substitution table'),
('uint16','AlternateSetCount',None,None,'Number of AlternateSet tables'),
('Offset','AlternateSet','AlternateSetCount',0,'Array of offsets to AlternateSet tables-from beginning of Substitution table-ordered by Coverage Index'),
]),
('AlternateSet',[
('uint16','GlyphCount',None,None,'Number of GlyphIDs in the Alternate array'),
('GlyphID','Alternate','GlyphCount',0,'Array of alternate GlyphIDs-in arbitrary order'),
('Offset','Coverage',None,None,'Offset to Coverage table-from beginning of Substitution table'),
('Offset','ClassDef',None,None,'Offset to glyph ClassDef table-from beginning of Substitution table'),
('uint16','SubClassSetCnt',None,None,'Number of SubClassSet tables'),
('Offset','SubClassSet','SubClassSetCnt',0,'Array of offsets to SubClassSet tables-from beginning of Substitution table-ordered by class-may be NULL'),
('Offset','Coverage',None,None,'Offset to Coverage table-from beginning of Substitution table'),
('uint16','ChainSubRuleSetCount',None,None,'Number of ChainSubRuleSet tables-must equal GlyphCount in Coverage table'),
('Offset','ChainSubRuleSet','ChainSubRuleSetCount',0,'Array of offsets to ChainSubRuleSet tables-from beginning of Substitution table-ordered by Coverage Index'),
]),
('ChainSubRuleSet',[
('uint16','ChainSubRuleCount',None,None,'Number of ChainSubRule tables'),
('Offset','ChainSubRule','ChainSubRuleCount',0,'Array of offsets to ChainSubRule tables-from beginning of ChainSubRuleSet table-ordered by preference'),
]),
('ChainSubRule',[
('uint16','BacktrackGlyphCount',None,None,'Total number of glyphs in the backtrack sequence (number of glyphs to be matched before the first glyph)'),
('GlyphID','Backtrack','BacktrackGlyphCount',0,"Array of backtracking GlyphID's (to be matched before the input sequence)"),
('uint16','InputGlyphCount',None,None,'Total number of glyphs in the input sequence (includes the first glyph)'),
('GlyphID','Input','InputGlyphCount',-1,'Array of input GlyphIDs (start with second glyph)'),
('uint16','LookaheadGlyphCount',None,None,'Total number of glyphs in the look ahead sequence (number of glyphs to be matched after the input sequence)'),
('GlyphID','Lookahead','LookAheadGlyphCount',0,"Array of lookahead GlyphID's (to be matched after the input sequence)"),
('uint16','SubstCount',None,None,'Number of SubstLookupRecords'),
('struct','SubstLookupRecord','SubstCount',0,'Array of SubstLookupRecords (in design order)'),
('Offset','Coverage',None,None,'Offset to Coverage table-from beginning of Substitution table'),
('Offset','BacktrackClassDef',None,None,'Offset to glyph ClassDef table containing backtrack sequence data-from beginning of Substitution table'),
('Offset','InputClassDef',None,None,'Offset to glyph ClassDef table containing input sequence data-from beginning of Substitution table'),
('Offset','LookaheadClassDef',None,None,'Offset to glyph ClassDef table containing lookahead sequence data-from beginning of Substitution table'),
('uint16','ChainSubClassSetCnt',None,None,'Number of ChainSubClassSet tables'),
('Offset','ChainSubClassSet','ChainSubClassSetCnt',0,'Array of offsets to ChainSubClassSet tables-from beginning of Substitution table-ordered by input class-may be NULL'),
]),
('ChainSubClassSet',[
('uint16','ChainSubClassRuleCnt',None,None,'Number of ChainSubClassRule tables'),
('Offset','ChainSubClassRule','ChainSubClassRuleCount',0,'Array of offsets to ChainSubClassRule tables-from beginning of ChainSubClassSet-ordered by preference'),
]),
('ChainSubClassRule',[
('uint16','BacktrackGlyphCount',None,None,'Total number of glyphs in the backtrack sequence (number of glyphs to be matched before the first glyph)'),
('uint16','Backtrack','BacktrackGlyphCount',0,'Array of backtracking classes(to be matched before the input sequence)'),
('uint16','InputGlyphCount',None,None,'Total number of classes in the input sequence (includes the first class)'),
('uint16','Input','InputGlyphCount',-1,'Array of input classes(start with second class; to be matched with the input glyph sequence)'),
('uint16','LookaheadGlyphCount',None,None,'Total number of classes in the look ahead sequence (number of classes to be matched after the input sequence)'),
('uint16','LookAhead','LookAheadGlyphCount',0,'Array of lookahead classes(to be matched after the input sequence)'),
('uint16','SubstCount',None,None,'Number of SubstLookupRecords'),
('struct','SubstLookupRecord','SubstCount',0,'Array of SubstLookupRecords (in design order)'),
('uint16','BacktrackGlyphCount',None,None,'Number of glyphs in the backtracking sequence'),
('Offset','BacktrackCoverage','BacktrackGlyphCount',0,'Array of offsets to coverage tables in backtracking sequence, in glyph sequence order'),
('uint16','InputGlyphCount',None,None,'Number of glyphs in input sequence'),
('Offset','InputCoverage','InputGlyphCount',0,'Array of offsets to coverage tables in input sequence, in glyph sequence order'),
('uint16','LookaheadGlyphCount',None,None,'Number of glyphs in lookahead sequence'),
('Offset','LookaheadCoverage','LookaheadGlyphCount',0,'Array of offsets to coverage tables in lookahead sequence, in glyph sequence order'),
('uint16','SubstCount',None,None,'Number of SubstLookupRecords'),
('struct','SubstLookupRecord','SubstCount',0,'Array of SubstLookupRecords, in design order'),
]),
('ExtensionSubstFormat1',[
('USHORT','SubstFormat',None,None,'Format identifier. Set to 1.'),
('USHORT','ExtensionLookupType',None,None,'Lookup type of subtable referenced by ExtensionOffset (i.e. the extension subtable).'),
('ULONG','ExtensionOffset',None,None,'Offset to the extension subtable, of lookup type ExtensionLookupType, relative to the start of the ExtensionSubstFormat1 subtable.'),
]),
#
# gdef (generated from gdef.htm)
#
('GDEF',[
('Fixed','Version',None,None,'Version of the GDEF table-initially 0x00010000'),
('Offset','GlyphClassDef',None,None,'Offset to class definition table for glyph type-from beginning of GDEF header (may be NULL)'),
('Offset','AttachList',None,None,'Offset to list of glyphs with attachment points-from beginning of GDEF header (may be NULL)'),
('Offset','LigCaretList',None,None,'Offset to list of positioning points for ligature carets-from beginning of GDEF header (may be NULL)'),
('Offset','MarkAttachClassDef',None,None,'Offset to class definition table for mark attachment type-from beginning of GDEF header (may be NULL)'),
]),
('AttachList',[
('Offset','Coverage',None,None,'Offset to Coverage table - from beginning of AttachList table'),
('uint16','GlyphCount',None,None,'Number of glyphs with attachment points'),
('Offset','AttachPoint','GlyphCount',0,'Array of offsets to AttachPoint tables-from beginning of AttachList table-in Coverage Index order'),
]),
('AttachPoint',[
('uint16','PointCount',None,None,'Number of attachment points on this glyph'),
('uint16','PointIndex','PointCount',0,'Array of contour point indices -in increasing numerical order'),
]),
('LigCaretList',[
('Offset','Coverage',None,None,'Offset to Coverage table - from beginning of LigCaretList table'),
('uint16','LigGlyphCount',None,None,'Number of ligature glyphs'),
('Offset','LigGlyph','LigGlyphCount',0,'Array of offsets to LigGlyph tables-from beginning of LigCaretList table-in Coverage Index order'),
]),
('LigGlyph',[
('uint16','CaretCount',None,None,'Number of CaretValues for this ligature (components - 1)'),
('Offset','CaretValue','CaretCount',0,'Array of offsets to CaretValue tables-from beginning of LigGlyph table-in increasing coordinate order'),
('Offset','BaseScript',None,None,'Offset to BaseScript table-from beginning of BaseScriptList'),
]),
('BaseScript',[
('Offset','BaseValues',None,None,'Offset to BaseValues table-from beginning of BaseScript table-may be NULL'),
('Offset','DefaultMinMax',None,None,'Offset to MinMax table- from beginning of BaseScript table-may be NULL'),
('uint16','BaseLangSysCount',None,None,'Number of BaseLangSysRecords defined-may be zero (0)'),
('struct','BaseLangSysRecord','BaseLangSysCount',0,'Array of BaseLangSysRecords-in alphabetical order by BaseLangSysTag'),
]),
('BaseLangSysRecord',[
('Tag','BaseLangSysTag',None,None,'4-byte language system identification tag'),
('Offset','MinMax',None,None,'Offset to MinMax table-from beginning of BaseScript table'),
]),
('BaseValues',[
('uint16','DefaultIndex',None,None,'Index number of default baseline for this script-equals index position of baseline tag in BaselineArray of the BaseTagList'),
('uint16','BaseCoordCount',None,None,'Number of BaseCoord tables defined-should equal BaseTagCount in the BaseTagList'),
('Offset','BaseCoord','BaseCoordCount',0,'Array of offsets to BaseCoord-from beginning of BaseValues table-order matches BaselineTag array in the BaseTagList'),
]),
('MinMax',[
('Offset','MinCoord',None,None,'Offset to BaseCoord table-defines minimum extent value-from the beginning of MinMax table-may be NULL'),
('Offset','MaxCoord',None,None,'Offset to BaseCoord table-defines maximum extent value-from the beginning of MinMax table-may be NULL'),
('uint16','FeatMinMaxCount',None,None,'Number of FeatMinMaxRecords-may be zero (0)'),
('struct','FeatMinMaxRecord','FeatMinMaxCount',0,'Array of FeatMinMaxRecords-in alphabetical order, by FeatureTableTag'),
]),
('FeatMinMaxRecord',[
('Tag','FeatureTableTag',None,None,'4-byte feature identification tag-must match FeatureTag in FeatureList'),
('Offset','MinCoord',None,None,'Offset to BaseCoord table-defines minimum extent value-from beginning of MinMax table-may be NULL'),
('Offset','MaxCoord',None,None,'Offset to BaseCoord table-defines maximum extent value-from beginning of MinMax table-may be NULL'),