-
Notifications
You must be signed in to change notification settings - Fork 4
Bitmap text
samme edited this page Nov 4, 2024
·
6 revisions
Bitmap text is drawn from a bitmap texture frame and font data. It's fast and looks good, but you have a limited character set.
Bitmap font generators make an image and XML data file. Use load.bitmapFont()
:
this.load.bitmapFont('key', 'font.png', 'font.xml');
Load the image and XML data separately, then call ParseFromAtlas()
to create the font.
Load the image and then call RetroFont.Parse()
with the font data.
These are game objects that display text using the font. There are two classes, BitmapText and DynamicBitmapText. They are both "dynamic" in the sense that you can change the text contents at any time. The difference is that DynamicBitmapText has callbacks for per-character rendering effects and scrolling.