Package com.jme3.font
Class BitmapFont
java.lang.Object
com.jme3.font.BitmapFont
- All Implemented Interfaces:
 Savable
Represents a font within jME that is generated with the AngelCode Bitmap Font Generator
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSpecifies horizontal alignment for text.static enumSpecifies vertical alignment for text. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptioncreateLabel(String content) floatgetCharacterAdvance(char curChar, char nextChar, float size) floatgetLineWidth(CharSequence text) getPage(int index) intfloatbooleanvoidmerge(BitmapFont newFont) Merge two fonts.voidread(JmeImporter im) voidsetCharSet(BitmapCharacterSet charSet) voidsetGlyphParser(GlyphParser glyphParser) For cursive fonts a GlyphParser needs to be specified which is used to determine glyph shape by the adjacent glyphs.voidvoidsetRightToLeft(boolean rightToLeft) Specify if this is a right-to-left font.voidsetStyle(int style) voidwrite(JmeExporter ex)  
- 
Constructor Details
- 
BitmapFont
public BitmapFont() 
 - 
 - 
Method Details
- 
isRightToLeft
public boolean isRightToLeft()- Returns:
 - true, if this is a right-to-left font, otherwise it will return false.
 
 - 
setRightToLeft
public void setRightToLeft(boolean rightToLeft) Specify if this is a right-to-left font. By default it is set to false. This can be "overwritten" in the BitmapText constructor.- Parameters:
 rightToLeft- true → right-to-left, false → left-to-right (default=false)
 - 
createLabel
 - 
getPreferredSize
public float getPreferredSize() - 
setCharSet
 - 
setPages
 - 
getPage
 - 
getPageSize
public int getPageSize() - 
getCharSet
 - 
setGlyphParser
For cursive fonts a GlyphParser needs to be specified which is used to determine glyph shape by the adjacent glyphs. If nothing is set, all glyphs will be rendered isolated.- Parameters:
 glyphParser- the desired parser (alias created) or null for none (default=null)
 - 
getGlyphParser
- Returns:
 - The GlyphParser set on the font, or null if it has no glyph parser.
 
 - 
getCharacterAdvance
public float getCharacterAdvance(char curChar, char nextChar, float size)  - 
write
- Specified by:
 writein interfaceSavable- Throws:
 IOException
 - 
read
- Specified by:
 readin interfaceSavable- Throws:
 IOException
 - 
getLineWidth
 - 
merge
Merge two fonts. If two font have the same style, merge will fail.- Parameters:
 newFont- Style must be assigned to this. author: Yonghoon
 - 
setStyle
public void setStyle(int style)  
 -