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