Package org.apache.batik.gvt.font
Class GVTGlyphMetrics
java.lang.Object
org.apache.batik.gvt.font.GVTGlyphMetrics
GVTGlyphMetrics is essentially a wrapper class for java.awt.font.GlyphMetrics
with the addition of horizontal and vertical advance values.
-
Constructor Summary
ConstructorsConstructorDescriptionGVTGlyphMetrics
(float horizontalAdvance, float verticalAdvance, Rectangle2D bounds, byte glyphType) Constructs a new GVTGlyphMetrics object using the specified parameters.GVTGlyphMetrics
(GlyphMetrics gm, float verticalAdvance) Constructs a new GVTGlyphMetrics object based upon the specified GlyphMetrics object and an additional vertical advance value. -
Method Summary
Modifier and TypeMethodDescriptionReturns the black box bounds of the glyph.float
Returns the horizontal advance of the glyph.float
getLSB()
Returns the left (top) side bearing of the glyph.float
getRSB()
Returns the right (bottom) side bearing of the glyph.int
getType()
Returns the raw glyph type code.float
Returns the vertical advance of the glyph.boolean
Returns true if this is a combining glyph.boolean
Returns true if this is a component glyph.boolean
Returns true if this is a ligature glyph.boolean
Returns true if this is a standard glyph.boolean
Returns true if this is a whitespace glyph.
-
Constructor Details
-
GVTGlyphMetrics
Constructs a new GVTGlyphMetrics object based upon the specified GlyphMetrics object and an additional vertical advance value.- Parameters:
gm
- The glyph metrics.verticalAdvance
- The vertical advance of the glyph.
-
GVTGlyphMetrics
public GVTGlyphMetrics(float horizontalAdvance, float verticalAdvance, Rectangle2D bounds, byte glyphType) Constructs a new GVTGlyphMetrics object using the specified parameters.- Parameters:
horizontalAdvance
- The horizontal advance of the glyph.verticalAdvance
- The vertical advance of the glyph.bounds
- The black box bounds of the glyph.glyphType
- The type of the glyph.
-
-
Method Details
-
getHorizontalAdvance
public float getHorizontalAdvance()Returns the horizontal advance of the glyph. -
getVerticalAdvance
public float getVerticalAdvance()Returns the vertical advance of the glyph. -
getBounds2D
Returns the black box bounds of the glyph. -
getLSB
public float getLSB()Returns the left (top) side bearing of the glyph. -
getRSB
public float getRSB()Returns the right (bottom) side bearing of the glyph. -
getType
public int getType()Returns the raw glyph type code. -
isCombining
public boolean isCombining()Returns true if this is a combining glyph. -
isComponent
public boolean isComponent()Returns true if this is a component glyph. -
isLigature
public boolean isLigature()Returns true if this is a ligature glyph. -
isStandard
public boolean isStandard()Returns true if this is a standard glyph. -
isWhitespace
public boolean isWhitespace()Returns true if this is a whitespace glyph.
-