| Modifier and Type | Field and Description |
|---|---|
com.badlogic.gdx.graphics.g2d.BitmapFont |
bitmapFont |
| Constructor and Description |
|---|
LibgdxBitmapFont() |
LibgdxBitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData data,
org.mini2Dx.gdx.utils.Array<TextureRegion> pageRegions,
boolean integer) |
LibgdxBitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData data,
TextureRegion region,
boolean integer) |
LibgdxBitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont bitmapFont) |
LibgdxBitmapFont(FileHandle fileHandle) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes of this font instance and its resources
|
void |
draw(Graphics g,
java.lang.String str,
float x,
float y)
Draws text to the
Graphics context using this font |
void |
draw(Graphics g,
java.lang.String str,
float x,
float y,
float targetWidth)
Draws text to the
Graphics context using this font |
void |
draw(Graphics g,
java.lang.String str,
float x,
float y,
float targetWidth,
int horizontalAlignment,
boolean wrap)
Draws text to the
Graphics context using this font |
float |
getCapHeight()
Returns the height of a capital letter above the baseline
|
Color |
getColor()
Returns the
Color the font will be rendered with |
float |
getLineHeight()
Returns the line height of the font
|
FontGlyphLayout |
getSharedGlyphLayout()
Returns a
FontGlyphLayout instance associated with this GameFont instance |
boolean |
load(AssetManager assetManager)
Loads the
GameFont via the AssetManager |
boolean |
loadExternal()
Loads the
GameFont using Files.external(String) |
boolean |
loadInternal()
Loads the
GameFont using Files.internal(String) |
GameFontCache |
newCache()
Creates a
GameFontCache for this font |
FontGlyphLayout |
newGlyphLayout()
Creates a
FontGlyphLayout for this font |
void |
setColor(Color color)
Sets the
Color to render the font with |
boolean |
useIntegerPositions()
Returns if characters use integer positions
|
public LibgdxBitmapFont()
public LibgdxBitmapFont(FileHandle fileHandle)
public LibgdxBitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData data,
TextureRegion region,
boolean integer)
public LibgdxBitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData data,
org.mini2Dx.gdx.utils.Array<TextureRegion> pageRegions,
boolean integer)
public LibgdxBitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont bitmapFont)
public boolean loadInternal()
GameFontGameFont using Files.internal(String)loadInternal in interface GameFontpublic boolean loadExternal()
GameFontGameFont using Files.external(String)loadExternal in interface GameFontpublic boolean load(AssetManager assetManager)
GameFontGameFont via the AssetManagerload in interface GameFontassetManager - The AssetManager to usepublic void draw(Graphics g, java.lang.String str, float x, float y)
GameFontGraphics context using this fontpublic void draw(Graphics g, java.lang.String str, float x, float y, float targetWidth)
GameFontGraphics context using this fontpublic void draw(Graphics g, java.lang.String str, float x, float y, float targetWidth, int horizontalAlignment, boolean wrap)
GameFontGraphics context using this fontdraw in interface GameFontg - The Graphics contextstr - The text to renderx - The x coordinate to draw aty - The y coordinate to draw attargetWidth - The target width to render withhorizontalAlignment - The horizontal alignment within the targetWidth. See Alignwrap - True if text should wrap if exceeding targetWidth, false if it should clippublic FontGlyphLayout newGlyphLayout()
GameFontFontGlyphLayout for this fontnewGlyphLayout in interface GameFontFontGlyphLayout instancepublic FontGlyphLayout getSharedGlyphLayout()
GameFontFontGlyphLayout instance associated with this GameFont instancegetSharedGlyphLayout in interface GameFontFontGlyphLayout instance attached to this fontpublic GameFontCache newCache()
GameFontGameFontCache for this fontnewCache in interface GameFontGameFontCache instancepublic Color getColor()
GameFontColor the font will be rendered withpublic void setColor(Color color)
GameFontColor to render the font withpublic float getLineHeight()
GameFontgetLineHeight in interface GameFontpublic float getCapHeight()
GameFontgetCapHeight in interface GameFontpublic boolean useIntegerPositions()
GameFontuseIntegerPositions in interface GameFont