2
* @(#)SimpleArrayProcessor.cpp 1.6 00/03/15
4
* (C) Copyright IBM Corp. 1998, 1999, 2000, 2001 - All Rights Reserved
9
#include "MorphTables.h"
10
#include "SubtableProcessor.h"
11
#include "NonContextualGlyphSubst.h"
12
#include "NonContextualGlyphSubstProc.h"
13
#include "SimpleArrayProcessor.h"
18
SimpleArrayProcessor::SimpleArrayProcessor()
22
SimpleArrayProcessor::SimpleArrayProcessor(const MorphSubtableHeader *morphSubtableHeader)
23
: NonContextualGlyphSubstitutionProcessor(morphSubtableHeader)
25
const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader;
27
simpleArrayLookupTable = (const SimpleArrayLookupTable *) &header->table;
30
SimpleArrayProcessor::~SimpleArrayProcessor()
34
void SimpleArrayProcessor::process(LEGlyphID *glyphs, le_int32 *charIndices, le_int32 glyphCount)
38
for (glyph = 0; glyph < glyphCount; glyph += 1) {
39
if (glyphs[glyph] < 0xFFFF) {
40
le_int16 newGlyph = simpleArrayLookupTable->valueArray[glyphs[glyph]];
42
glyphs[glyph] = SWAPW(newGlyph);