3 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
7 #ifndef __GLYPHITERATOR_H
8 #define __GLYPHITERATOR_H
16 #include "OpenTypeTables.h"
17 #include "GlyphDefinitionTables.h"
22 class GlyphPositionAdjustments;
24 class GlyphIterator : public UMemory {
26 GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags,
27 FeatureMask theFeatureMask, const LEReferenceTo<GlyphDefinitionTableHeader> &theGlyphDefinitionTableHeader);
29 GlyphIterator(GlyphIterator &that);
31 GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask);
33 GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags);
35 virtual ~GlyphIterator();
37 void reset(le_uint16 newLookupFlags, LETag newFeatureTag);
39 le_bool next(le_uint32 delta = 1);
40 le_bool prev(le_uint32 delta = 1);
41 le_bool findFeatureTag();
43 le_bool isRightToLeft() const;
44 le_bool ignoresMarks() const;
46 le_bool baselineIsLogicalEnd() const;
48 LEGlyphID getCurrGlyphID() const;
49 le_int32 getCurrStreamPosition() const;
51 le_int32 getMarkComponent(le_int32 markPosition) const;
52 le_bool findMark2Glyph();
54 void getCursiveEntryPoint(LEPoint &entryPoint) const;
55 void getCursiveExitPoint(LEPoint &exitPoint) const;
57 void setCurrGlyphID(TTGlyphID glyphID);
58 void setCurrStreamPosition(le_int32 position);
59 void setCurrGlyphBaseOffset(le_int32 baseOffset);
60 void adjustCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,
61 float xAdvanceAdjust, float yAdvanceAdjust);
63 void setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,
64 float xAdvanceAdjust, float yAdvanceAdjust);
66 void clearCursiveEntryPoint();
67 void clearCursiveExitPoint();
68 void setCursiveEntryPoint(LEPoint &entryPoint);
69 void setCursiveExitPoint(LEPoint &exitPoint);
70 void setCursiveGlyph();
72 LEGlyphID *insertGlyphs(le_int32 count, LEErrorCode& success);
73 le_int32 applyInsertions();
76 le_bool filterGlyph(le_uint32 index);
77 le_bool hasFeatureTag(le_bool matchGroup) const;
78 le_bool nextInternal(le_uint32 delta = 1);
79 le_bool prevInternal(le_uint32 delta = 1);
86 LEGlyphStorage &glyphStorage;
87 GlyphPositionAdjustments *glyphPositionAdjustments;
91 le_uint16 lookupFlags;
92 FeatureMask featureMask;
95 LEReferenceTo<GlyphClassDefinitionTable> glyphClassDefinitionTable;
96 LEReferenceTo<MarkAttachClassDefinitionTable> markAttachClassDefinitionTable;
98 GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class
104 le_bool filterCacheValid;
106 void filterResetCache(void);