com.jme3.font
Class BitmapFont

java.lang.Object
  extended by 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


Nested Class Summary
static class BitmapFont.Align
          Specifies horizontal alignment for text.
static class BitmapFont.VAlign
          Specifies vertical alignment for text.
 
Constructor Summary
BitmapFont()
           
 
Method Summary
 BitmapText createLabel(java.lang.String content)
           
 float getCharacterAdvance(char curChar, char nextChar, float size)
           
 BitmapCharacterSet getCharSet()
           
 float getLineHeight(com.jme3.font.StringBlock sb)
          Gets the line height of a StringBlock.
 float getLineWidth(java.lang.CharSequence text)
           
 Material getPage(int index)
           
 int getPageSize()
           
 float getPreferredSize()
           
 void merge(BitmapFont newFont)
          Merge two fonts.
 void read(JmeImporter im)
           
 void setCharSet(BitmapCharacterSet charSet)
           
 void setPages(Material[] pages)
           
 void setStyle(int style)
           
 void write(JmeExporter ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitmapFont

public BitmapFont()
Method Detail

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)