4 * (C) Copyright IBM Corp. 1998-2016 - All Rights Reserved
8 #ifndef __LOOKUPPROCESSOR_H
9 #define __LOOKUPPROCESSOR_H
17 #include "LEFontInstance.h"
18 #include "OpenTypeTables.h"
19 #include "LETableReference.h"
27 class GlyphPositionAdjustments;
29 struct FeatureListTable;
30 struct GlyphDefinitionTableHeader;
31 struct LookupSubtable;
33 class LookupProcessor : public UMemory {
35 le_int32 process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
36 le_bool rightToLeft, const LEReferenceTo<GlyphDefinitionTableHeader> &glyphDefinitionTableHeader, const LEFontInstance *fontInstance, LEErrorCode& success) const;
38 le_uint32 applyLookupTable(const LEReferenceTo<LookupTable> &lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
40 le_uint32 applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
42 virtual le_uint32 applySubtable(const LEReferenceTo<LookupSubtable> &lookupSubtable, le_uint16 subtableType,
43 GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const = 0;
45 virtual ~LookupProcessor();
47 const LETableReference &getReference() const { return fReference; }
50 LookupProcessor(const LETableReference &baseAddress,
51 Offset scriptListOffset,
52 Offset featureListOffset,
53 Offset lookupListOffset,
56 const FeatureMap *featureMap,
57 le_int32 featureMapCount,
58 le_bool orderFeatures,
59 LEErrorCode& success);
63 le_int32 selectLookups(const LEReferenceTo<FeatureTable> &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success);
65 LEReferenceTo<LookupListTable> lookupListTable;
66 LEReferenceTo<FeatureListTable> featureListTable;
68 FeatureMask *lookupSelectArray;
69 le_uint32 lookupSelectCount;
71 le_uint16 *lookupOrderArray;
72 le_uint32 lookupOrderCount;
74 LETableReference fReference;
78 LookupProcessor(const LookupProcessor &other); // forbid copying of this class
79 LookupProcessor &operator=(const LookupProcessor &other); // forbid copying of this class