00001 /* 00002 * @(#)PairPositioningSubtables.h 1.7 00/03/15 00003 * 00004 * (C) Copyright IBM Corp. 1998, 1999, 2000 - All Rights Reserved 00005 * 00006 */ 00007 00008 #ifndef __PAIRPOSITIONINGSUBTABLES_H 00009 #define __PAIRPOSITIONINGSUBTABLES_H 00010 00011 #include "LETypes.h" 00012 #include "LEFontInstance.h" 00013 #include "OpenTypeTables.h" 00014 #include "GlyphPositioningTables.h" 00015 #include "ValueRecords.h" 00016 #include "GlyphIterator.h" 00017 00018 // NOTE: ValueRecord has a variable size 00019 struct PairValueRecord 00020 { 00021 LEGlyphID secondGlyph; 00022 ValueRecord valueRecord1; 00023 // ValueRecord valueRecord2; 00024 }; 00025 00026 struct PairSetTable 00027 { 00028 le_uint16 pairValueCount; 00029 PairValueRecord pairValueRecordArray[ANY_NUMBER]; 00030 }; 00031 00032 struct PairPositioningSubtable : GlyphPositioningSubtable 00033 { 00034 ValueFormat valueFormat1; 00035 ValueFormat valueFormat2; 00036 00037 le_uint32 process(GlyphIterator *glyphIterator, LEFontInstance *fontInstance); 00038 }; 00039 00040 struct PairPositioningFormat1Subtable : PairPositioningSubtable 00041 { 00042 le_uint16 pairSetCount; 00043 Offset pairSetTableOffsetArray[ANY_NUMBER]; 00044 00045 le_uint32 process(GlyphIterator *glyphIterator, LEFontInstance *fontInstance); 00046 00047 private: 00048 PairValueRecord *findPairValueRecord(LEGlyphID glyphID, PairValueRecord *records, 00049 le_uint16 recordCount, le_uint16 recordSize); 00050 }; 00051 00052 // NOTE: ValueRecord has a variable size 00053 struct Class2Record 00054 { 00055 ValueRecord valueRecord1; 00056 // ValueRecord valurRecord2; 00057 }; 00058 00059 struct Class1Record 00060 { 00061 Class2Record class2RecordArray[ANY_NUMBER]; 00062 }; 00063 00064 struct PairPositioningFormat2Subtable : PairPositioningSubtable 00065 { 00066 Offset classDef1Offset; 00067 Offset classDef2Offset; 00068 le_uint16 class1Count; 00069 le_uint16 class2Count; 00070 Class1Record class1RecordArray[ANY_NUMBER]; 00071 00072 le_uint32 process(GlyphIterator *glyphIterator, LEFontInstance *fontInstance); 00073 }; 00074 00075 #endif 00076 00077