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