]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | /* |
b75a7d8f | 2 | * |
374ca955 | 3 | * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved |
b75a7d8f A |
4 | * |
5 | */ | |
6 | ||
7 | #ifndef __PAIRPOSITIONINGSUBTABLES_H | |
8 | #define __PAIRPOSITIONINGSUBTABLES_H | |
9 | ||
10 | /** | |
11 | * \file | |
12 | * \internal | |
13 | */ | |
14 | ||
15 | #include "LETypes.h" | |
16 | #include "LEFontInstance.h" | |
17 | #include "OpenTypeTables.h" | |
18 | #include "GlyphPositioningTables.h" | |
19 | #include "ValueRecords.h" | |
20 | #include "GlyphIterator.h" | |
21 | ||
22 | U_NAMESPACE_BEGIN | |
23 | ||
24 | // NOTE: ValueRecord has a variable size | |
25 | struct PairValueRecord | |
26 | { | |
27 | TTGlyphID secondGlyph; | |
28 | ValueRecord valueRecord1; | |
29 | // ValueRecord valueRecord2; | |
30 | }; | |
31 | ||
32 | struct PairSetTable | |
33 | { | |
34 | le_uint16 pairValueCount; | |
35 | PairValueRecord pairValueRecordArray[ANY_NUMBER]; | |
36 | }; | |
37 | ||
38 | struct PairPositioningSubtable : GlyphPositioningSubtable | |
39 | { | |
40 | ValueFormat valueFormat1; | |
41 | ValueFormat valueFormat2; | |
42 | ||
43 | le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; | |
44 | }; | |
45 | ||
46 | struct PairPositioningFormat1Subtable : PairPositioningSubtable | |
47 | { | |
48 | le_uint16 pairSetCount; | |
49 | Offset pairSetTableOffsetArray[ANY_NUMBER]; | |
50 | ||
51 | le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; | |
52 | ||
53 | private: | |
54 | const PairValueRecord *findPairValueRecord(TTGlyphID glyphID, const PairValueRecord *records, | |
55 | le_uint16 recordCount, le_uint16 recordSize) const; | |
56 | }; | |
57 | ||
58 | // NOTE: ValueRecord has a variable size | |
59 | struct Class2Record | |
60 | { | |
61 | ValueRecord valueRecord1; | |
62 | // ValueRecord valurRecord2; | |
63 | }; | |
64 | ||
65 | struct Class1Record | |
66 | { | |
67 | Class2Record class2RecordArray[ANY_NUMBER]; | |
68 | }; | |
69 | ||
70 | struct PairPositioningFormat2Subtable : PairPositioningSubtable | |
71 | { | |
72 | Offset classDef1Offset; | |
73 | Offset classDef2Offset; | |
74 | le_uint16 class1Count; | |
75 | le_uint16 class2Count; | |
76 | Class1Record class1RecordArray[ANY_NUMBER]; | |
77 | ||
78 | le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; | |
79 | }; | |
80 | ||
81 | U_NAMESPACE_END | |
82 | #endif | |
83 | ||
84 |