public interface GameFont
| 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  Graphicscontext using this font | 
| void | draw(Graphics g,
    java.lang.String str,
    float x,
    float y,
    float targetWidth)Draws text to the  Graphicscontext 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  Graphicscontext using this font | 
| float | getCapHeight()Returns the height of a capital letter above the baseline | 
| com.badlogic.gdx.graphics.Color | getColor()Returns the  Colorthe font will be rendered with | 
| float | getLineHeight()Returns the line height of the font | 
| FontGlyphLayout | getSharedGlyphLayout()Returns a  FontGlyphLayoutinstance associated with thisGameFontinstance | 
| GameFontCache | newCache()Creates a  GameFontCachefor this font | 
| FontGlyphLayout | newGlyphLayout()Creates a  FontGlyphLayoutfor this font | 
| void | setColor(com.badlogic.gdx.graphics.Color color)Sets the  Colorto render the font with | 
| boolean | useIntegerPositions()Returns if characters use integer positions | 
void draw(Graphics g, java.lang.String str, float x, float y)
Graphics context using this fontg - The Graphics contextstr - The text to renderx - The x coordinate to draw aty - The y coordinate to draw atvoid draw(Graphics g, java.lang.String str, float x, float y, float targetWidth)
Graphics context using this fontg - The Graphics contextstr - The text to renderx - The x coordinate to draw aty - The y coordinate to draw attargetWidth - The target width to render with (Note: text will wrap if exceeding this width)void draw(Graphics g, java.lang.String str, float x, float y, float targetWidth, int horizontalAlignment, boolean wrap)
Graphics context using this fontg - 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 clipFontGlyphLayout newGlyphLayout()
FontGlyphLayout for this fontFontGlyphLayout instanceFontGlyphLayout getSharedGlyphLayout()
FontGlyphLayout instance associated with this GameFont instanceFontGlyphLayout instance attached to this fontGameFontCache newCache()
GameFontCache for this fontGameFontCache instancecom.badlogic.gdx.graphics.Color getColor()
Color the font will be rendered withColor.BLACK by defaultvoid setColor(com.badlogic.gdx.graphics.Color color)
Color to render the font withcolor - float getLineHeight()
float getCapHeight()
boolean useIntegerPositions()
void dispose()