3 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
8 #include "LEFontInstance.h"
9 #include "OpenTypeTables.h"
10 #include "GlyphPositioningTables.h"
11 #include "SinglePositioningSubtables.h"
12 #include "ValueRecords.h"
13 #include "GlyphIterator.h"
18 le_uint32
SinglePositioningSubtable::process(const LEReferenceTo
<SinglePositioningSubtable
> &base
, GlyphIterator
*glyphIterator
, const LEFontInstance
*fontInstance
, LEErrorCode
&success
) const
20 switch(SWAPW(subtableFormat
))
27 const LEReferenceTo
<SinglePositioningFormat1Subtable
> subtable(base
, success
, (const SinglePositioningFormat1Subtable
*) this);
29 return subtable
->process(subtable
, glyphIterator
, fontInstance
, success
);
34 const LEReferenceTo
<SinglePositioningFormat2Subtable
> subtable(base
, success
, (const SinglePositioningFormat2Subtable
*) this);
36 return subtable
->process(subtable
, glyphIterator
, fontInstance
, success
);
44 le_uint32
SinglePositioningFormat1Subtable::process(const LEReferenceTo
<SinglePositioningFormat1Subtable
> &base
, GlyphIterator
*glyphIterator
, const LEFontInstance
*fontInstance
, LEErrorCode
&success
) const
46 LEGlyphID glyph
= glyphIterator
->getCurrGlyphID();
47 le_int32 coverageIndex
= getGlyphCoverage(base
, glyph
, success
);
49 if (coverageIndex
>= 0) {
50 valueRecord
.adjustPosition(SWAPW(valueFormat
), (const char *) this, *glyphIterator
, fontInstance
);
58 le_uint32
SinglePositioningFormat2Subtable::process(const LEReferenceTo
<SinglePositioningFormat2Subtable
> &base
, GlyphIterator
*glyphIterator
, const LEFontInstance
*fontInstance
, LEErrorCode
&success
) const
60 LEGlyphID glyph
= glyphIterator
->getCurrGlyphID();
61 le_int16 coverageIndex
= (le_int16
) getGlyphCoverage(base
, glyph
, success
);
63 if (coverageIndex
>= 0) {
64 valueRecordArray
[0].adjustPosition(coverageIndex
, SWAPW(valueFormat
), (const char *) this, *glyphIterator
, fontInstance
);