|
GTGE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.golden.gamedev.object.GameFontManager
public class GameFontManager
Simplify GameFont
creation and also behave as the storage of
loaded font.
com.golden.gamedev.object.font
Constructor Summary | |
---|---|
GameFontManager()
Creates new GameFontManager . |
Method Summary | |
---|---|
void |
clear()
Removed all loaded font from the storage. |
GameFont |
getFont(BufferedImage bitmap)
Returns default AdvanceBitmapFont
that using standard Bitmap Font Writer, created by Stefan
Pettersson. |
GameFont |
getFont(BufferedImage[] bitmap)
Returns bitmap font with specified images following this letter sequence : ! |
GameFont |
getFont(BufferedImage[] bitmap,
String letterSequence)
Returns bitmap font with specified font images and letter sequence. |
GameFont |
getFont(BufferedImage bitmap,
String letterSequence)
Returns AdvanceBitmapFont
that using standard Bitmap Font Writer, created by Stefan
Pettersson. |
GameFont |
getFont(Font f)
Returns font with specified system font, the color of the font is following active color of the graphics context where the font drawn. |
GameFont |
getFont(Font f,
Color col)
Returns font with specified system font and color. |
GameFont |
getFont(String name)
Returns font with specified name. |
GameFont |
putFont(String name,
GameFont font)
Inserts font with specified name to font manager storage. |
Object |
removeFont(Object name)
Removes font with specified name from font manager storage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GameFontManager()
GameFontManager
.
Method Detail |
---|
public void clear()
public Object removeFont(Object name)
public GameFont getFont(String name)
putFont(String, GameFont)
public GameFont putFont(String name, GameFont font)
getFont(String)
public GameFont getFont(BufferedImage bitmap)
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. The images should be following this letter sequence :
! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~How to: Creating Bitmap Font Writer Font
bitmap
- the font images
GameFont
.public GameFont getFont(BufferedImage bitmap, String letterSequence)
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 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.
bitmap
- the font imagesletterSequence
- the letter sequence of the bitmap
GameFont
.public GameFont getFont(BufferedImage[] bitmap)
! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
If requested font has not been created before, this method creates new
BitmapFont
and return it.
public GameFont getFont(BufferedImage[] bitmap, String letterSequence)
public GameFont getFont(Font f)
public GameFont getFont(Font f, Color col)
|
GTGE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |