sl@0: /* sl@0: * sl@0: * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved sl@0: * sl@0: */ sl@0: sl@0: #include "LETypes.h" sl@0: #include "MorphTables.h" sl@0: #include "SubtableProcessor.h" sl@0: #include "NonContextualGlyphSubst.h" sl@0: #include "NonContextualGlyphSubstProc.h" sl@0: #include "SimpleArrayProcessor.h" sl@0: #include "LEGlyphStorage.h" sl@0: #include "LESwaps.h" sl@0: sl@0: U_NAMESPACE_BEGIN sl@0: sl@0: UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SimpleArrayProcessor) sl@0: sl@0: SimpleArrayProcessor::SimpleArrayProcessor() sl@0: { sl@0: } sl@0: sl@0: SimpleArrayProcessor::SimpleArrayProcessor(const MorphSubtableHeader *morphSubtableHeader) sl@0: : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader) sl@0: { sl@0: const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader; sl@0: sl@0: simpleArrayLookupTable = (const SimpleArrayLookupTable *) &header->table; sl@0: } sl@0: sl@0: SimpleArrayProcessor::~SimpleArrayProcessor() sl@0: { sl@0: } sl@0: sl@0: void SimpleArrayProcessor::process(LEGlyphStorage &glyphStorage) sl@0: { sl@0: le_int32 glyphCount = glyphStorage.getGlyphCount(); sl@0: le_int32 glyph; sl@0: sl@0: for (glyph = 0; glyph < glyphCount; glyph += 1) { sl@0: LEGlyphID thisGlyph = glyphStorage[glyph]; sl@0: if (LE_GET_GLYPH(thisGlyph) < 0xFFFF) { sl@0: TTGlyphID newGlyph = SWAPW(simpleArrayLookupTable->valueArray[LE_GET_GLYPH(thisGlyph)]); sl@0: sl@0: glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); sl@0: } sl@0: } sl@0: } sl@0: sl@0: U_NAMESPACE_END