com.golden.gamedev.util
Class FontUtil

java.lang.Object
  |
  +--com.golden.gamedev.util.FontUtil

public class FontUtil
extends Object

Utility class for manipulating Font object.


Method Summary
static BufferedImage createBitmapFont(Font f, Color col)
          Creates bitmap font from the specified font that can be used by AdvanceBitmapFont.
static Font createTrueTypeFont(URL url, int style, float size)
          Creates True Type Font (*.ttf) from the specified URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createTrueTypeFont

public static Font createTrueTypeFont(URL url,
                                      int style,
                                      float size)
Creates True Type Font (*.ttf) from the specified URL.

See Also:
BaseIO.getURL(String)

createBitmapFont

public static BufferedImage createBitmapFont(Font f,
                                             Color col)
Creates bitmap font from the specified font that can be used by AdvanceBitmapFont.
The bitmap is created using standard Bitmap Font Writer, created by Stefan Pettersson (http://www.stefan-pettersson.nu).

Returns:
bitmap font using standard Bitmap Font Writer technique
See Also:
GameFontManager.getFont(BufferedImage), AdvanceBitmapFont