com.jme3.font
Class BitmapFont
java.lang.Object
com.jme3.font.BitmapFont
- All Implemented Interfaces:
- Savable
public class BitmapFont
- extends java.lang.Object
- implements Savable
Represents a font within jME that is generated with the AngelCode Bitmap Font Generator
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BitmapFont
public BitmapFont()
createLabel
public BitmapText createLabel(java.lang.String content)
getPreferredSize
public float getPreferredSize()
setCharSet
public void setCharSet(BitmapCharacterSet charSet)
setPages
public void setPages(Material[] pages)
getPage
public Material getPage(int index)
getPageSize
public int getPageSize()
getCharSet
public BitmapCharacterSet getCharSet()
getLineHeight
public float getLineHeight(com.jme3.font.StringBlock sb)
- Gets the line height of a StringBlock.
- Parameters:
sb
-
- Returns:
- the line height
getCharacterAdvance
public float getCharacterAdvance(char curChar,
char nextChar,
float size)
write
public void write(JmeExporter ex)
throws java.io.IOException
- Specified by:
write
in interface Savable
- Throws:
java.io.IOException
read
public void read(JmeImporter im)
throws java.io.IOException
- Specified by:
read
in interface Savable
- Throws:
java.io.IOException
getLineWidth
public float getLineWidth(java.lang.CharSequence text)
merge
public void merge(BitmapFont newFont)
- Merge two fonts.
If two font have the same style, merge will fail.
- Parameters:
newFont
- Style must be assigned to this.
setStyle
public void setStyle(int style)