sl@0
|
1 |
/*
|
sl@0
|
2 |
* %W% %E%
|
sl@0
|
3 |
*
|
sl@0
|
4 |
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
|
sl@0
|
5 |
*
|
sl@0
|
6 |
*/
|
sl@0
|
7 |
|
sl@0
|
8 |
#ifndef __LOOKUPPROCESSOR_H
|
sl@0
|
9 |
#define __LOOKUPPROCESSOR_H
|
sl@0
|
10 |
|
sl@0
|
11 |
/**
|
sl@0
|
12 |
* \file
|
sl@0
|
13 |
* \internal
|
sl@0
|
14 |
*/
|
sl@0
|
15 |
|
sl@0
|
16 |
#include "LETypes.h"
|
sl@0
|
17 |
#include "LEFontInstance.h"
|
sl@0
|
18 |
#include "OpenTypeTables.h"
|
sl@0
|
19 |
//#include "Lookups.h"
|
sl@0
|
20 |
//#include "Features.h"
|
sl@0
|
21 |
|
sl@0
|
22 |
U_NAMESPACE_BEGIN
|
sl@0
|
23 |
|
sl@0
|
24 |
class LEFontInstance;
|
sl@0
|
25 |
class LEGlyphStorage;
|
sl@0
|
26 |
class GlyphIterator;
|
sl@0
|
27 |
class GlyphPositionAdjustments;
|
sl@0
|
28 |
struct FeatureTable;
|
sl@0
|
29 |
struct FeatureListTable;
|
sl@0
|
30 |
struct GlyphDefinitionTableHeader;
|
sl@0
|
31 |
struct LookupSubtable;
|
sl@0
|
32 |
struct LookupTable;
|
sl@0
|
33 |
|
sl@0
|
34 |
class LookupProcessor : public UMemory {
|
sl@0
|
35 |
public:
|
sl@0
|
36 |
static const LETag notSelected;
|
sl@0
|
37 |
static const LETag defaultFeature;
|
sl@0
|
38 |
|
sl@0
|
39 |
le_bool isBogus();
|
sl@0
|
40 |
|
sl@0
|
41 |
le_int32 process(LEGlyphStorage &glyphStorage,
|
sl@0
|
42 |
GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
|
sl@0
|
43 |
const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
|
sl@0
|
44 |
const LEFontInstance *fontInstance, LEErrorCode& success) const;
|
sl@0
|
45 |
|
sl@0
|
46 |
le_uint32 applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator,
|
sl@0
|
47 |
const LEFontInstance *fontInstance, LEErrorCode& success) const;
|
sl@0
|
48 |
|
sl@0
|
49 |
le_uint32 applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator,
|
sl@0
|
50 |
const LEFontInstance *fontInstance, LEErrorCode& success) const;
|
sl@0
|
51 |
|
sl@0
|
52 |
virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 subtableType,
|
sl@0
|
53 |
GlyphIterator *glyphIterator, const LEFontInstance *fontInstance,
|
sl@0
|
54 |
LEErrorCode& success) const = 0;
|
sl@0
|
55 |
|
sl@0
|
56 |
virtual ~LookupProcessor();
|
sl@0
|
57 |
|
sl@0
|
58 |
protected:
|
sl@0
|
59 |
LookupProcessor(const char *baseAddress,
|
sl@0
|
60 |
Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
|
sl@0
|
61 |
LETag scriptTag, LETag languageTag, const LETag *featureOrder);
|
sl@0
|
62 |
|
sl@0
|
63 |
LookupProcessor();
|
sl@0
|
64 |
|
sl@0
|
65 |
le_int32 selectLookups(const FeatureTable *featureTable, LETag featureTag, le_int32 order);
|
sl@0
|
66 |
|
sl@0
|
67 |
const LookupListTable *lookupListTable;
|
sl@0
|
68 |
const FeatureListTable *featureListTable;
|
sl@0
|
69 |
|
sl@0
|
70 |
LETag *lookupSelectArray;
|
sl@0
|
71 |
LETag requiredFeatureTag;
|
sl@0
|
72 |
|
sl@0
|
73 |
le_uint16 *lookupOrderArray;
|
sl@0
|
74 |
le_uint32 lookupOrderCount;
|
sl@0
|
75 |
|
sl@0
|
76 |
private:
|
sl@0
|
77 |
|
sl@0
|
78 |
LookupProcessor(const LookupProcessor &other); // forbid copying of this class
|
sl@0
|
79 |
LookupProcessor &operator=(const LookupProcessor &other); // forbid copying of this class
|
sl@0
|
80 |
};
|
sl@0
|
81 |
|
sl@0
|
82 |
U_NAMESPACE_END
|
sl@0
|
83 |
#endif
|