public class BatchRenderFont extends Object implements RenderFont
Constructor and Description |
---|
BatchRenderFont(BatchRenderDevice batchRenderDevice,
String name,
org.jglfont.BitmapFontFactory factory,
NiftyResourceLoader resourceLoader) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
This RenderFont is not needed anymore.
|
org.jglfont.BitmapFont |
getBitmapFont() |
int |
getCharacterAdvance(char currentCharacter,
char nextCharacter,
float size)
Return the advance of the given character including kerning information.
|
int |
getHeight()
The height of the font in pixel.
|
int |
getWidth(String text)
Get width in pixel of given text.
|
int |
getWidth(String text,
float size)
Get width in pixel of given text.
|
public BatchRenderFont(BatchRenderDevice batchRenderDevice, String name, org.jglfont.BitmapFontFactory factory, NiftyResourceLoader resourceLoader) throws IOException
IOException
public int getHeight()
RenderFont
getHeight
in interface RenderFont
public int getWidth(String text)
RenderFont
getWidth
in interface RenderFont
text
- the text to measure.public int getWidth(String text, float size)
RenderFont
getWidth
in interface RenderFont
text
- the text to measure.size
- sizepublic int getCharacterAdvance(char currentCharacter, char nextCharacter, float size)
RenderFont
getCharacterAdvance
in interface RenderFont
currentCharacter
- current characternextCharacter
- next charactersize
- font sizepublic void dispose()
RenderFont
dispose
in interface RenderFont
public org.jglfont.BitmapFont getBitmapFont()
Copyright © 2013. All Rights Reserved.