Package com.jme3.niftygui
Class RenderFontJme
java.lang.Object
com.jme3.niftygui.RenderFontJme
- All Implemented Interfaces:
de.lessvoid.nifty.spi.render.RenderFont
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
int
getCharacterAdvance
(char currentCharacter, char nextCharacter, float size) Return the width of the given character including kerning information.getFont()
int
get font height.getText()
int
get font width of the given string.int
-
Constructor Details
-
RenderFontJme
Initialize the font.- Parameters:
name
- font filenamedisplay
- (not null)
-
-
Method Details
-
createText
-
getFont
-
getText
-
getHeight
public int getHeight()get font height.- Specified by:
getHeight
in interfacede.lessvoid.nifty.spi.render.RenderFont
- Returns:
- height
-
getWidth
get font width of the given string.- Specified by:
getWidth
in interfacede.lessvoid.nifty.spi.render.RenderFont
- Parameters:
str
- text- Returns:
- width of the given text for the current font
-
getWidth
- Specified by:
getWidth
in interfacede.lessvoid.nifty.spi.render.RenderFont
-
getCharacterAdvance
public int getCharacterAdvance(char currentCharacter, char nextCharacter, float size) Return the width of the given character including kerning information.- Specified by:
getCharacterAdvance
in interfacede.lessvoid.nifty.spi.render.RenderFont
- Parameters:
currentCharacter
- current characternextCharacter
- next charactersize
- font size- Returns:
- width of the character or null when no information for the character is available
-
dispose
public void dispose()- Specified by:
dispose
in interfacede.lessvoid.nifty.spi.render.RenderFont
-