3 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
7 #ifndef __PAIRPOSITIONINGSUBTABLES_H
8 #define __PAIRPOSITIONINGSUBTABLES_H
16 #include "LEFontInstance.h"
17 #include "OpenTypeTables.h"
18 #include "GlyphPositioningTables.h"
19 #include "ValueRecords.h"
20 #include "GlyphIterator.h"
24 // NOTE: ValueRecord has a variable size
25 struct PairValueRecord
27 TTGlyphID secondGlyph
;
28 ValueRecord valueRecord1
;
29 // ValueRecord valueRecord2;
34 le_uint16 pairValueCount
;
35 PairValueRecord pairValueRecordArray
[ANY_NUMBER
];
37 LE_VAR_ARRAY(PairSetTable
, pairValueRecordArray
)
39 struct PairPositioningSubtable
: GlyphPositioningSubtable
41 ValueFormat valueFormat1
;
42 ValueFormat valueFormat2
;
44 le_uint32
process(const LEReferenceTo
<PairPositioningSubtable
> &base
, GlyphIterator
*glyphIterator
, const LEFontInstance
*fontInstance
, LEErrorCode
&success
) const;
47 struct PairPositioningFormat1Subtable
: PairPositioningSubtable
49 le_uint16 pairSetCount
;
50 Offset pairSetTableOffsetArray
[ANY_NUMBER
];
52 le_uint32
process(const LEReferenceTo
<PairPositioningFormat1Subtable
> &base
, GlyphIterator
*glyphIterator
, const LEFontInstance
*fontInstance
, LEErrorCode
&success
) const;
55 const PairValueRecord
*findPairValueRecord(TTGlyphID glyphID
, const PairValueRecord
*records
,
56 le_uint16 recordCount
, le_uint16 recordSize
) const;
58 LE_VAR_ARRAY(PairPositioningFormat1Subtable
, pairSetTableOffsetArray
)
60 // NOTE: ValueRecord has a variable size
63 ValueRecord valueRecord1
;
64 // ValueRecord valurRecord2;
69 Class2Record class2RecordArray
[ANY_NUMBER
];
71 LE_VAR_ARRAY(Class1Record
, class2RecordArray
)
73 struct PairPositioningFormat2Subtable
: PairPositioningSubtable
75 Offset classDef1Offset
;
76 Offset classDef2Offset
;
77 le_uint16 class1Count
;
78 le_uint16 class2Count
;
79 Class1Record class1RecordArray
[ANY_NUMBER
];
81 le_uint32
process(const LEReferenceTo
<PairPositioningFormat2Subtable
> &base
, GlyphIterator
*glyphIterator
, const LEFontInstance
*fontInstance
, LEErrorCode
&success
) const;
83 LE_VAR_ARRAY(PairPositioningFormat2Subtable
, class1RecordArray
)