Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/native/sun/font/layout/GlyphIterator.h
38918 views
/*1* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.2*3* This code is free software; you can redistribute it and/or modify it4* under the terms of the GNU General Public License version 2 only, as5* published by the Free Software Foundation. Oracle designates this6* particular file as subject to the "Classpath" exception as provided7* by Oracle in the LICENSE file that accompanied this code.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*23*/2425/*26*27* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved28*29*/3031#ifndef __GLYPHITERATOR_H32#define __GLYPHITERATOR_H3334/**35* \file36* \internal37*/3839#include "LETypes.h"40#include "OpenTypeTables.h"41#include "GlyphDefinitionTables.h"4243U_NAMESPACE_BEGIN4445class LEGlyphStorage;46class GlyphPositionAdjustments;4748class GlyphIterator : public UMemory {49public:50GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags,51FeatureMask theFeatureMask, const LEReferenceTo<GlyphDefinitionTableHeader> &theGlyphDefinitionTableHeader, LEErrorCode &success);5253GlyphIterator(GlyphIterator &that);5455GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask);5657GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags);5859virtual ~GlyphIterator();6061void reset(le_uint16 newLookupFlags, LETag newFeatureTag);6263le_bool next(le_uint32 delta = 1);64le_bool prev(le_uint32 delta = 1);65le_bool findFeatureTag();6667le_bool isRightToLeft() const;68le_bool ignoresMarks() const;6970le_bool baselineIsLogicalEnd() const;7172LEGlyphID getCurrGlyphID() const;73le_int32 getCurrStreamPosition() const;7475le_int32 getMarkComponent(le_int32 markPosition) const;76le_bool findMark2Glyph();7778void getCursiveEntryPoint(LEPoint &entryPoint) const;79void getCursiveExitPoint(LEPoint &exitPoint) const;8081void setCurrGlyphID(TTGlyphID glyphID);82void setCurrStreamPosition(le_int32 position);83void setCurrGlyphBaseOffset(le_int32 baseOffset);84void adjustCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,85float xAdvanceAdjust, float yAdvanceAdjust);8687void setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,88float xAdvanceAdjust, float yAdvanceAdjust);8990void clearCursiveEntryPoint();91void clearCursiveExitPoint();92void setCursiveEntryPoint(LEPoint &entryPoint);93void setCursiveExitPoint(LEPoint &exitPoint);94void setCursiveGlyph();9596LEGlyphID *insertGlyphs(le_int32 count, LEErrorCode& success);97le_int32 applyInsertions();9899private:100le_bool filterGlyph(le_uint32 index);101le_bool hasFeatureTag(le_bool matchGroup) const;102le_bool nextInternal(le_uint32 delta = 1);103le_bool prevInternal(le_uint32 delta = 1);104105le_int32 direction;106le_int32 position;107le_int32 nextLimit;108le_int32 prevLimit;109110LEGlyphStorage &glyphStorage;111GlyphPositionAdjustments *glyphPositionAdjustments;112113le_int32 srcIndex;114le_int32 destIndex;115le_uint16 lookupFlags;116FeatureMask featureMask;117le_int32 glyphGroup;118119LEReferenceTo<GlyphClassDefinitionTable> glyphClassDefinitionTable;120LEReferenceTo<MarkAttachClassDefinitionTable> markAttachClassDefinitionTable;121122GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class123124struct {125LEGlyphID id;126le_bool result;127} filterCache;128le_bool filterCacheValid;129130void filterResetCache(void);131};132133U_NAMESPACE_END134#endif135136137