public class RenderFontJme
extends java.lang.Object
implements de.lessvoid.nifty.spi.render.RenderFont
Constructor and Description |
---|
RenderFontJme(java.lang.String name,
NiftyJmeDisplay display)
Initialize the font.
|
Modifier and Type | Method and Description |
---|---|
BitmapText |
createText() |
void |
dispose() |
int |
getCharacterAdvance(char currentCharacter,
char nextCharacter,
float size)
Return the width of the given character including kerning information.
|
BitmapFont |
getFont() |
int |
getHeight()
get font height.
|
BitmapText |
getText() |
int |
getWidth(java.lang.String str)
get font width of the given string.
|
int |
getWidth(java.lang.String str,
float size) |
public RenderFontJme(java.lang.String name, NiftyJmeDisplay display)
name
- font filenamepublic BitmapText createText()
public BitmapFont getFont()
public BitmapText getText()
public int getHeight()
getHeight
in interface de.lessvoid.nifty.spi.render.RenderFont
public int getWidth(java.lang.String str)
getWidth
in interface de.lessvoid.nifty.spi.render.RenderFont
str
- textpublic int getWidth(java.lang.String str, float size)
getWidth
in interface de.lessvoid.nifty.spi.render.RenderFont
public int getCharacterAdvance(char currentCharacter, char nextCharacter, float size)
getCharacterAdvance
in interface de.lessvoid.nifty.spi.render.RenderFont
currentCharacter
- current characternextCharacter
- next charactersize
- font sizepublic void dispose()
dispose
in interface de.lessvoid.nifty.spi.render.RenderFont