4 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
8 #ifndef __LOOKUPPROCESSOR_H
9 #define __LOOKUPPROCESSOR_H
17 #include "LEFontInstance.h"
18 #include "OpenTypeTables.h"
19 #include "LETableReference.h"
20 //#include "Lookups.h"
21 //#include "Features.h"
28 class GlyphPositionAdjustments
;
30 struct FeatureListTable
;
31 struct GlyphDefinitionTableHeader
;
32 struct LookupSubtable
;
35 class LookupProcessor
: public UMemory
{
37 le_int32
process(LEGlyphStorage
&glyphStorage
, GlyphPositionAdjustments
*glyphPositionAdjustments
,
38 le_bool rightToLeft
, const LEReferenceTo
<GlyphDefinitionTableHeader
> &glyphDefinitionTableHeader
, const LEFontInstance
*fontInstance
, LEErrorCode
& success
) const;
40 le_uint32
applyLookupTable(const LEReferenceTo
<LookupTable
> &lookupTable
, GlyphIterator
*glyphIterator
, const LEFontInstance
*fontInstance
, LEErrorCode
& success
) const;
42 le_uint32
applySingleLookup(le_uint16 lookupTableIndex
, GlyphIterator
*glyphIterator
, const LEFontInstance
*fontInstance
, LEErrorCode
& success
) const;
44 virtual le_uint32
applySubtable(const LEReferenceTo
<LookupSubtable
> &lookupSubtable
, le_uint16 subtableType
,
45 GlyphIterator
*glyphIterator
, const LEFontInstance
*fontInstance
, LEErrorCode
& success
) const = 0;
47 virtual ~LookupProcessor();
49 const LETableReference
&getReference() const { return fReference
; }
52 LookupProcessor(const LETableReference
&baseAddress
,
53 Offset scriptListOffset
,
54 Offset featureListOffset
,
55 Offset lookupListOffset
,
58 const FeatureMap
*featureMap
,
59 le_int32 featureMapCount
,
60 le_bool orderFeatures
,
61 LEErrorCode
& success
);
65 le_int32
selectLookups(const LEReferenceTo
<FeatureTable
> &featureTable
, FeatureMask featureMask
, le_int32 order
, LEErrorCode
&success
);
67 LEReferenceTo
<LookupListTable
> lookupListTable
;
68 LEReferenceTo
<FeatureListTable
> featureListTable
;
70 FeatureMask
*lookupSelectArray
;
71 le_uint32 lookupSelectCount
;
73 le_uint16
*lookupOrderArray
;
74 le_uint32 lookupOrderCount
;
76 LETableReference fReference
;
80 LookupProcessor(const LookupProcessor
&other
); // forbid copying of this class
81 LookupProcessor
&operator=(const LookupProcessor
&other
); // forbid copying of this class