GTGE API

com.golden.gamedev.util
Class FontUtil

java.lang.Object
  extended by com.golden.gamedev.util.FontUtil

public class FontUtil
extends Object

Utility class for manipulating java.awt.Font object.


Method Summary
static BufferedImage createBitmapFont(Font f, Color col)
          Creates bitmap font from specified java.awt.Font that can be used by AdvanceBitmapFont.
static Font createTrueTypeFont(URL url, int style, float size)
          Creates java.awt.Font from specified True Type Font URL (*.ttf).
 
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 java.awt.Font from specified True Type Font URL (*.ttf).

See Also:
BaseIO.getURL(String), GameFontManager.getFont(Font)

createBitmapFont

public static BufferedImage createBitmapFont(Font f,
                                             Color col)
Creates bitmap font from specified java.awt.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:
Font images using standard Bitmap Font Writer technique.
See Also:
AdvanceBitmapFont, GameFontManager.getFont(BufferedImage)

GTGE API

Copyright © 2003-2005 Golden T Studios. All rights reserved. Use is subject to license terms.
GoldenStudios.or.id