]> git.saurik.com Git - apple/icu.git/blob - icuSources/layout/LookupProcessor.h
ICU-8.11.2.tar.gz
[apple/icu.git] / icuSources / layout / LookupProcessor.h
1 /*
2 * %W% %E%
3 *
4 * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
5 *
6 */
7
8 #ifndef __LOOKUPPROCESSOR_H
9 #define __LOOKUPPROCESSOR_H
10
11 /**
12 * \file
13 * \internal
14 */
15
16 #include "LETypes.h"
17 #include "LEFontInstance.h"
18 #include "OpenTypeTables.h"
19 //#include "Lookups.h"
20 //#include "Features.h"
21
22 U_NAMESPACE_BEGIN
23
24 class LEFontInstance;
25 class LEGlyphStorage;
26 class GlyphIterator;
27 class GlyphPositionAdjustments;
28 struct FeatureTable;
29 struct FeatureListTable;
30 struct GlyphDefinitionTableHeader;
31 struct LookupSubtable;
32 struct LookupTable;
33
34 class LookupProcessor : public UMemory {
35 public:
36 le_int32 process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
37 le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, const LEFontInstance *fontInstance) const;
38
39 le_uint32 applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
40
41 le_uint32 applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
42
43 virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 subtableType,
44 GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const = 0;
45
46 virtual ~LookupProcessor();
47
48 protected:
49 LookupProcessor(const char *baseAddress,
50 Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
51 LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool orderFeatures);
52
53 LookupProcessor();
54
55 le_int32 selectLookups(const FeatureTable *featureTable, FeatureMask featureMask, le_int32 order);
56
57 const LookupListTable *lookupListTable;
58 const FeatureListTable *featureListTable;
59
60 FeatureMask *lookupSelectArray;
61
62 le_uint16 *lookupOrderArray;
63 le_uint32 lookupOrderCount;
64
65 private:
66
67 LookupProcessor(const LookupProcessor &other); // forbid copying of this class
68 LookupProcessor &operator=(const LookupProcessor &other); // forbid copying of this class
69 };
70
71 U_NAMESPACE_END
72 #endif