os/textandloc/fontservices/textshaperplugin/IcuSource/layout/PairPositioningSubtables.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/textandloc/fontservices/textshaperplugin/IcuSource/layout/PairPositioningSubtables.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,84 @@
     1.4 +/*
     1.5 + *
     1.6 + * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
     1.7 + *
     1.8 + */
     1.9 +
    1.10 +#ifndef __PAIRPOSITIONINGSUBTABLES_H
    1.11 +#define __PAIRPOSITIONINGSUBTABLES_H
    1.12 +
    1.13 +/**
    1.14 + * \file
    1.15 + * \internal
    1.16 + */
    1.17 +
    1.18 +#include "LETypes.h"
    1.19 +#include "LEFontInstance.h"
    1.20 +#include "OpenTypeTables.h"
    1.21 +#include "GlyphPositioningTables.h"
    1.22 +#include "ValueRecords.h"
    1.23 +#include "GlyphIterator.h"
    1.24 +
    1.25 +U_NAMESPACE_BEGIN
    1.26 +
    1.27 +// NOTE: ValueRecord has a variable size
    1.28 +struct PairValueRecord
    1.29 +{
    1.30 +    TTGlyphID     secondGlyph;
    1.31 +    ValueRecord valueRecord1;
    1.32 +//  ValueRecord valueRecord2;
    1.33 +};
    1.34 +
    1.35 +struct PairSetTable
    1.36 +{
    1.37 +    le_uint16       pairValueCount;
    1.38 +    PairValueRecord pairValueRecordArray[ANY_NUMBER];
    1.39 +};
    1.40 +
    1.41 +struct PairPositioningSubtable : GlyphPositioningSubtable
    1.42 +{
    1.43 +    ValueFormat valueFormat1;
    1.44 +    ValueFormat valueFormat2;
    1.45 +
    1.46 +    le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
    1.47 +};
    1.48 +
    1.49 +struct PairPositioningFormat1Subtable : PairPositioningSubtable
    1.50 +{
    1.51 +    le_uint16   pairSetCount;
    1.52 +    Offset      pairSetTableOffsetArray[ANY_NUMBER];
    1.53 +
    1.54 +    le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
    1.55 +
    1.56 +private:
    1.57 +    const PairValueRecord *findPairValueRecord(TTGlyphID glyphID, const PairValueRecord *records,
    1.58 +        le_uint16 recordCount, le_uint16 recordSize) const;
    1.59 +};
    1.60 +
    1.61 +// NOTE: ValueRecord has a variable size
    1.62 +struct Class2Record
    1.63 +{
    1.64 +    ValueRecord valueRecord1;
    1.65 +//  ValueRecord valurRecord2;
    1.66 +};
    1.67 +
    1.68 +struct Class1Record
    1.69 +{
    1.70 +    Class2Record class2RecordArray[ANY_NUMBER];
    1.71 +};
    1.72 +
    1.73 +struct PairPositioningFormat2Subtable : PairPositioningSubtable
    1.74 +{
    1.75 +    Offset       classDef1Offset;
    1.76 +    Offset       classDef2Offset;
    1.77 +    le_uint16    class1Count;
    1.78 +    le_uint16    class2Count;
    1.79 +    Class1Record class1RecordArray[ANY_NUMBER];
    1.80 +
    1.81 +    le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
    1.82 +};
    1.83 +
    1.84 +U_NAMESPACE_END
    1.85 +#endif
    1.86 +
    1.87 +