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
IOExceptionpublic int getHeight()
RenderFontgetHeight in interface RenderFontpublic int getWidth(String text)
RenderFontgetWidth in interface RenderFonttext - the text to measure.public int getWidth(String text, float size)
RenderFontgetWidth in interface RenderFonttext - the text to measure.size - sizepublic int getCharacterAdvance(char currentCharacter,
char nextCharacter,
float size)
RenderFontgetCharacterAdvance in interface RenderFontcurrentCharacter - current characternextCharacter - next charactersize - font sizepublic void dispose()
RenderFontdispose in interface RenderFontpublic org.jglfont.BitmapFont getBitmapFont()
Copyright © 2013. All Rights Reserved.