com.golden.gamedev.object
Class GameFontManager

java.lang.Object
  |
  +--com.golden.gamedev.object.GameFontManager

public class GameFontManager
extends Object

Simplify GameFont creation, also behave as the storage of the loaded GameFont.

See Also:
com.golden.gamedev.object.font

Constructor Summary
GameFontManager()
           
 
Method Summary
 void clear()
           
 GameFont getFont(BufferedImage bitmap)
          Returns AdvanceBitmapFont that using standard Bitmap Font Writer, created by Stefan Pettersson.
 GameFont getFont(BufferedImage[] bitmap)
           
 GameFont getFont(Font f)
           
 GameFont getFont(Font f, Color col)
           
 GameFont getFont(String name)
           
 void putFont(String name, GameFont font)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameFontManager

public GameFontManager()
Method Detail

clear

public void clear()

getFont

public GameFont getFont(String name)

putFont

public void putFont(String name,
                    GameFont font)

getFont

public GameFont getFont(BufferedImage bitmap)
Returns AdvanceBitmapFont that using standard Bitmap Font Writer, created by Stefan Pettersson. Bitmap Font Writer is freeware font editor, visit Bitmap Font Writer website (http://www.stefan-pettersson.nu) for updates and additional information.

How to: Creating Bitmap Font Writer Font
The image size shall be cut exactly according to the font size, but leaving a one pixel row above the characters.
This row of pixels is used to define each characters width.
The first pixel (0,0) will be used as the font width delimiters.
See AdvanceBitmapFont for the right font sequence.

Returns:
Bitmap GameFont

getFont

public GameFont getFont(BufferedImage[] bitmap)

getFont

public GameFont getFont(Font f)

getFont

public GameFont getFont(Font f,
                        Color col)