3 * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
7 #ifndef __GLYPHITERATOR_H
8 #define __GLYPHITERATOR_H
16 #include "OpenTypeTables.h"
17 #include "GlyphDefinitionTables.h"
18 #include "GlyphPositionAdjustments.h"
24 class GlyphIterator
: public UMemory
{
26 GlyphIterator(LEGlyphStorage
&theGlyphStorage
, GlyphPositionAdjustment
*theGlyphPositionAdjustments
, le_bool rightToLeft
, le_uint16 theLookupFlags
, LETag theFeatureTag
,
27 const GlyphDefinitionTableHeader
*theGlyphDefinitionTableHeader
);
29 GlyphIterator(GlyphIterator
&that
);
31 GlyphIterator(GlyphIterator
&that
, LETag newFeatureTag
);
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;
47 le_bool
hasCursiveFirstExitPoint() const;
48 le_bool
hasCursiveLastExitPoint() const;
50 LEGlyphID
getCurrGlyphID() const;
51 le_int32
getCurrStreamPosition() const;
52 void getCurrGlyphPositionAdjustment(GlyphPositionAdjustment
&adjustment
) const;
54 le_int32
getMarkComponent(le_int32 markPosition
) const;
55 le_bool
findMark2Glyph();
57 void getCursiveLastExitPoint(LEPoint
&exitPoint
) const;
58 LEGlyphID
getCursiveLastGlyphID() const;
59 float getCursiveBaselineAdjustment() const;
60 void getCursiveLastPositionAdjustment(GlyphPositionAdjustment
&adjustment
) const;
62 void setCurrGlyphID(TTGlyphID glyphID
);
63 void setCurrStreamPosition(le_int32 position
);
64 void setCurrGlyphPositionAdjustment(const GlyphPositionAdjustment
*adjustment
);
65 void setCurrGlyphBaseOffset(le_int32 baseOffset
);
66 void adjustCurrGlyphPositionAdjustment(float xPlacementAdjust
, float yPlacementAdjust
,
67 float xAdvanceAdjust
, float yAdvanceAdjust
);
69 void setCurrGlyphPositionAdjustment(float xPlacementAdjust
, float yPlacementAdjust
,
70 float xAdvanceAdjust
, float yAdvanceAdjust
);
72 void setCursiveFirstExitPoint();
73 void resetCursiveLastExitPoint();
74 void setCursiveLastExitPoint(LEPoint
&exitPoint
);
75 void setCursiveBaselineAdjustment(float adjustment
);
76 void adjustCursiveLastGlyphPositionAdjustment(float xPlacmentAdjust
, float yPlacementAdjust
,
77 float xAdvanceAdjust
, float yAdvanceAdjust
);
79 LEGlyphID
*insertGlyphs(le_int32 count
);
80 le_int32
applyInsertions();
83 le_bool
filterGlyph(le_uint32 index
) const;
84 le_bool
hasFeatureTag() const;
85 le_bool
nextInternal(le_uint32 delta
= 1);
86 le_bool
prevInternal(le_uint32 delta
= 1);
92 le_int32 cursiveFirstPosition
;
93 le_int32 cursiveLastPosition
;
94 float cursiveBaselineAdjustment
;
95 LEPoint cursiveLastExitPoint
;
96 LEGlyphStorage
&glyphStorage
;
97 GlyphPositionAdjustment
*glyphPositionAdjustments
;
100 le_uint16 lookupFlags
;
102 const GlyphClassDefinitionTable
*glyphClassDefinitionTable
;
103 const MarkAttachClassDefinitionTable
*markAttachClassDefinitionTable
;
105 GlyphIterator
&operator=(const GlyphIterator
&other
); // forbid copying of this class