]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /* |
2 | * %W% %E% | |
3 | * | |
2ca993e8 | 4 | * (C) Copyright IBM Corp. 1998-2016 - All Rights Reserved |
b75a7d8f A |
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" | |
57a6839d | 19 | #include "LETableReference.h" |
2ca993e8 | 20 | #include "Lookups.h" |
b75a7d8f A |
21 | |
22 | U_NAMESPACE_BEGIN | |
23 | ||
73c04bcf A |
24 | class LEFontInstance; |
25 | class LEGlyphStorage; | |
26 | class GlyphIterator; | |
27 | class GlyphPositionAdjustments; | |
28 | struct FeatureTable; | |
29 | struct FeatureListTable; | |
30 | struct GlyphDefinitionTableHeader; | |
31 | struct LookupSubtable; | |
374ca955 | 32 | |
b75a7d8f A |
33 | class LookupProcessor : public UMemory { |
34 | public: | |
73c04bcf | 35 | le_int32 process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, |
57a6839d | 36 | le_bool rightToLeft, const LEReferenceTo<GlyphDefinitionTableHeader> &glyphDefinitionTableHeader, const LEFontInstance *fontInstance, LEErrorCode& success) const; |
b75a7d8f | 37 | |
57a6839d | 38 | le_uint32 applyLookupTable(const LEReferenceTo<LookupTable> &lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; |
b75a7d8f | 39 | |
729e4ab9 | 40 | le_uint32 applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; |
b75a7d8f | 41 | |
57a6839d | 42 | virtual le_uint32 applySubtable(const LEReferenceTo<LookupSubtable> &lookupSubtable, le_uint16 subtableType, |
729e4ab9 | 43 | GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const = 0; |
b75a7d8f A |
44 | |
45 | virtual ~LookupProcessor(); | |
46 | ||
57a6839d A |
47 | const LETableReference &getReference() const { return fReference; } |
48 | ||
b75a7d8f | 49 | protected: |
57a6839d | 50 | LookupProcessor(const LETableReference &baseAddress, |
729e4ab9 A |
51 | Offset scriptListOffset, |
52 | Offset featureListOffset, | |
53 | Offset lookupListOffset, | |
54 | LETag scriptTag, | |
55 | LETag languageTag, | |
56 | const FeatureMap *featureMap, | |
57 | le_int32 featureMapCount, | |
58 | le_bool orderFeatures, | |
59 | LEErrorCode& success); | |
60 | ||
61 | LookupProcessor(); | |
b75a7d8f | 62 | |
57a6839d | 63 | le_int32 selectLookups(const LEReferenceTo<FeatureTable> &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success); |
b75a7d8f | 64 | |
57a6839d A |
65 | LEReferenceTo<LookupListTable> lookupListTable; |
66 | LEReferenceTo<FeatureListTable> featureListTable; | |
b75a7d8f | 67 | |
73c04bcf | 68 | FeatureMask *lookupSelectArray; |
4388f060 | 69 | le_uint32 lookupSelectCount; |
b75a7d8f A |
70 | |
71 | le_uint16 *lookupOrderArray; | |
72 | le_uint32 lookupOrderCount; | |
73 | ||
57a6839d A |
74 | LETableReference fReference; |
75 | ||
b75a7d8f A |
76 | private: |
77 | ||
78 | LookupProcessor(const LookupProcessor &other); // forbid copying of this class | |
79 | LookupProcessor &operator=(const LookupProcessor &other); // forbid copying of this class | |
80 | }; | |
81 | ||
82 | U_NAMESPACE_END | |
83 | #endif |