APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.tools.hiero.unicodefont

public Class Glyph

extends Object
Class Inheritance
Imports
java.awt.Font, .Rectangle, .Shape, java.awt.font.GlyphMetrics, .GlyphVector, com.badlogic.gdx.graphics.Texture, com.badlogic.gdx.graphics.g2d.BitmapFont, com.badlogic.gdx.tools.hiero.unicodefont.UnicodeFont.RenderType

Represents the glyph in a font for a Unicode codepoint.
Author
Nathan Sweet

Field Summary

Modifier and TypeField and Description
private int
private short
private boolean
private Shape
pack-priv Texture
pack-priv float
u

pack-priv float
pack-priv float
v

pack-priv float
private short
private int
private int
private short

Constructor Summary

AccessConstructor and Description
pack-priv
Glyph(int codePoint, Rectangle bounds, GlyphVector vector, int index, UnicodeFont unicodeFont)

Method Summary

Modifier and TypeMethod and Description
public int
getCodePoint()

The Unicode codepoint the glyph represents.

public int
getHeight()

The height of the glyph's image.

public Shape
getShape()

The shape to use to draw this glyph.

public Texture
public float
getU()

public float
public float
getV()

public float
public int
getWidth()

The width of the glyph's image.

public int
public int
public int
getYOffset()

The distance from drawing y location to top of this glyph, causing the glyph to sit on the baseline.

public boolean
isMissing()

Returns true if the font does not have a glyph for this codepoint.

public void
setShape(Shape shape)

public void
setTexture(Texture texture, float u, float v, float u2, float v2)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

codePointback to summary
private int codePoint
heightback to summary
private short height
isMissingback to summary
private boolean isMissing
shapeback to summary
private Shape shape
textureback to summary
pack-priv Texture texture
uback to summary
pack-priv float u
u2back to summary
pack-priv float u2
vback to summary
pack-priv float v
v2back to summary
pack-priv float v2
widthback to summary
private short width
xAdvanceback to summary
private int xAdvance
xOffsetback to summary
private int xOffset
yOffsetback to summary
private short yOffset

Constructor Detail

Glyphback to summary
pack-priv Glyph(int codePoint, Rectangle bounds, GlyphVector vector, int index, UnicodeFont unicodeFont)

Method Detail

getCodePointback to summary
public int getCodePoint()

The Unicode codepoint the glyph represents.

getHeightback to summary
public int getHeight()

The height of the glyph's image.

getShapeback to summary
public Shape getShape()

The shape to use to draw this glyph. This is set to null after the glyph is stored in a GlyphPage.

getTextureback to summary
public Texture getTexture()
getUback to summary
public float getU()
getU2back to summary
public float getU2()
getVback to summary
public float getV()
getV2back to summary
public float getV2()
getWidthback to summary
public int getWidth()

The width of the glyph's image.

getXAdvanceback to summary
public int getXAdvance()
getXOffsetback to summary
public int getXOffset()
getYOffsetback to summary
public int getYOffset()

The distance from drawing y location to top of this glyph, causing the glyph to sit on the baseline.

isMissingback to summary
public boolean isMissing()

Returns true if the font does not have a glyph for this codepoint.

setShapeback to summary
public void setShape(Shape shape)
setTextureback to summary
public void setTexture(Texture texture, float u, float v, float u2, float v2)