2
|
1 |
/*
|
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
3 |
*
|
|
4 |
* This code is free software; you can redistribute it and/or modify it
|
|
5 |
* under the terms of the GNU General Public License version 2 only, as
|
5506
|
6 |
* published by the Free Software Foundation. Oracle designates this
|
2
|
7 |
* particular file as subject to the "Classpath" exception as provided
|
5506
|
8 |
* by Oracle in the LICENSE file that accompanied this code.
|
2
|
9 |
*
|
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
14 |
* accompanied this code).
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU General Public License version
|
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
19 |
*
|
5506
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
21 |
* or visit www.oracle.com if you need additional information or have any
|
|
22 |
* questions.
|
2
|
23 |
*
|
|
24 |
*/
|
|
25 |
|
|
26 |
/*
|
|
27 |
*
|
|
28 |
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
|
|
29 |
*
|
|
30 |
*/
|
|
31 |
|
|
32 |
#ifndef __GLYPHITERATOR_H
|
|
33 |
#define __GLYPHITERATOR_H
|
|
34 |
|
3935
|
35 |
/**
|
|
36 |
* \file
|
|
37 |
* \internal
|
|
38 |
*/
|
|
39 |
|
2
|
40 |
#include "LETypes.h"
|
|
41 |
#include "OpenTypeTables.h"
|
|
42 |
#include "GlyphDefinitionTables.h"
|
|
43 |
|
3935
|
44 |
U_NAMESPACE_BEGIN
|
2
|
45 |
|
|
46 |
class LEGlyphStorage;
|
|
47 |
class GlyphPositionAdjustments;
|
|
48 |
|
3935
|
49 |
class GlyphIterator : public UMemory {
|
2
|
50 |
public:
|
3935
|
51 |
GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags,
|
16891
|
52 |
FeatureMask theFeatureMask, const LEReferenceTo<GlyphDefinitionTableHeader> &theGlyphDefinitionTableHeader);
|
2
|
53 |
|
|
54 |
GlyphIterator(GlyphIterator &that);
|
|
55 |
|
|
56 |
GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask);
|
|
57 |
|
|
58 |
GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags);
|
|
59 |
|
|
60 |
virtual ~GlyphIterator();
|
|
61 |
|
|
62 |
void reset(le_uint16 newLookupFlags, LETag newFeatureTag);
|
|
63 |
|
|
64 |
le_bool next(le_uint32 delta = 1);
|
|
65 |
le_bool prev(le_uint32 delta = 1);
|
|
66 |
le_bool findFeatureTag();
|
|
67 |
|
|
68 |
le_bool isRightToLeft() const;
|
|
69 |
le_bool ignoresMarks() const;
|
|
70 |
|
|
71 |
le_bool baselineIsLogicalEnd() const;
|
|
72 |
|
|
73 |
LEGlyphID getCurrGlyphID() const;
|
|
74 |
le_int32 getCurrStreamPosition() const;
|
|
75 |
|
|
76 |
le_int32 getMarkComponent(le_int32 markPosition) const;
|
|
77 |
le_bool findMark2Glyph();
|
|
78 |
|
|
79 |
void getCursiveEntryPoint(LEPoint &entryPoint) const;
|
|
80 |
void getCursiveExitPoint(LEPoint &exitPoint) const;
|
|
81 |
|
|
82 |
void setCurrGlyphID(TTGlyphID glyphID);
|
|
83 |
void setCurrStreamPosition(le_int32 position);
|
|
84 |
void setCurrGlyphBaseOffset(le_int32 baseOffset);
|
|
85 |
void adjustCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,
|
|
86 |
float xAdvanceAdjust, float yAdvanceAdjust);
|
|
87 |
|
|
88 |
void setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,
|
|
89 |
float xAdvanceAdjust, float yAdvanceAdjust);
|
|
90 |
|
7486
|
91 |
void clearCursiveEntryPoint();
|
|
92 |
void clearCursiveExitPoint();
|
2
|
93 |
void setCursiveEntryPoint(LEPoint &entryPoint);
|
|
94 |
void setCursiveExitPoint(LEPoint &exitPoint);
|
|
95 |
void setCursiveGlyph();
|
|
96 |
|
7486
|
97 |
LEGlyphID *insertGlyphs(le_int32 count, LEErrorCode& success);
|
2
|
98 |
le_int32 applyInsertions();
|
|
99 |
|
|
100 |
private:
|
|
101 |
le_bool filterGlyph(le_uint32 index) const;
|
7486
|
102 |
le_bool hasFeatureTag(le_bool matchGroup) const;
|
2
|
103 |
le_bool nextInternal(le_uint32 delta = 1);
|
|
104 |
le_bool prevInternal(le_uint32 delta = 1);
|
|
105 |
|
|
106 |
le_int32 direction;
|
|
107 |
le_int32 position;
|
|
108 |
le_int32 nextLimit;
|
|
109 |
le_int32 prevLimit;
|
|
110 |
|
|
111 |
LEGlyphStorage &glyphStorage;
|
|
112 |
GlyphPositionAdjustments *glyphPositionAdjustments;
|
|
113 |
|
|
114 |
le_int32 srcIndex;
|
|
115 |
le_int32 destIndex;
|
|
116 |
le_uint16 lookupFlags;
|
|
117 |
FeatureMask featureMask;
|
7486
|
118 |
le_int32 glyphGroup;
|
2
|
119 |
|
16891
|
120 |
LEReferenceTo<GlyphClassDefinitionTable> glyphClassDefinitionTable;
|
|
121 |
LEReferenceTo<MarkAttachClassDefinitionTable> markAttachClassDefinitionTable;
|
2
|
122 |
|
|
123 |
GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class
|
|
124 |
};
|
|
125 |
|
3935
|
126 |
U_NAMESPACE_END
|
2
|
127 |
#endif
|