]> git.saurik.com Git - apple/icu.git/blame - icuSources/layout/LookupProcessor.h
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / layout / LookupProcessor.h
CommitLineData
b75a7d8f
A
1/*
2 * %W% %E%
3 *
4 * (C) Copyright IBM Corp. 1998-2003 - 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#include "GlyphDefinitionTables.h"
22#include "GlyphPositionAdjustments.h"
23#include "GlyphIterator.h"
24
25U_NAMESPACE_BEGIN
26
27class LookupProcessor : public UMemory {
28public:
29 static const LETag notSelected;
30 static const LETag defaultFeature;
31
32 void process(LEGlyphID *glyphs, GlyphPositionAdjustment *glyphPositionAdjustments, const LETag **glyphTags, le_int32 glyphCount,
33 le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, const LEFontInstance *fontInstance) const;
34
35 le_uint32 applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
36
37 le_uint32 applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
38
39 virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 subtableType,
40 GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const = 0;
41
42 virtual ~LookupProcessor();
43
44protected:
45 LookupProcessor(const char *baseAddress,
46 Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
47 LETag scriptTag, LETag languageTag, const LETag *featureOrder);
48
49 LookupProcessor();
50
51 le_int32 selectLookups(const FeatureTable *featureTable, LETag featureTag, le_int32 order);
52
53 const LookupListTable *lookupListTable;
54 const FeatureListTable *featureListTable;
55
56 LETag *lookupSelectArray;
57 LETag requiredFeatureTag;
58
59 le_uint16 *lookupOrderArray;
60 le_uint32 lookupOrderCount;
61
62private:
63
64 LookupProcessor(const LookupProcessor &other); // forbid copying of this class
65 LookupProcessor &operator=(const LookupProcessor &other); // forbid copying of this class
66};
67
68U_NAMESPACE_END
69#endif