Bitmap Text object is in work in progress on Github

Bitmap Text object

The Bitmap Text object can be used to display a text without loss of quality if you up-scale the object. It's a good way to create a game with pixel text, or for a fancy unique font. This object give to you a complete artistic control on the styles of your text.

Bitmap font files

The object take in inputs two files.

  • Bitmap atlas image : This file is the sprite which contains all characters that can be draw. File format must be FNT or XML.
  • Bitmap Font : This file contains the data related to characters that can be draw, the engine use these data for knowing which characters render on screen. File format must be a PNG.

These two file can be created with an external editor for generate bitmap fonts. An external editor called bmFont can be used, see below for know how use it for export your custom bitmap font.

If you wish change dynamically the styles on Bitmap Text object with events, you can with some limitations. Remember you that object used generated files from an external editor for define styles.

All styles are define in the external editor and files are generated with these styles. If you wish a better dynamic text, take a look at the Text object, or at the BBtext object.

Font size and scale

This mean the font size can't be change in GDevelop, the font size is static and should be change in the external editor. For encounter this limitation the object have a scale property that can be used for make your Bitmap Text bigger or smaller but the font quality can be affected because the font generated wasn't thought for be rescale. The scale perperty act on both axis at the same time, so the ratio of the font is kept.

Font color and tint

For the font color, the same limitation is true. But here GDevelop allow to you to change the tint of the object.

Note that if you generate a white bitmap font, if you use a blue tint, the object will be as the same blue. If your bitmap font is grey, and the tint blue, the colours will be mixed each other.

Technical note

This Bitmap Text object is experimental and uses PixiJS. Since this project is open-source, feel free to contribute back to it or to GDevelop to improve the object (or report a bug).

## Creating a new bitmap font in bmFont

First of all start by creating your bitmap font with bmFont and export files as FNT and PNG files.

TODO
  • Short explains how to use bmFont (load a config file, and export files).
  • Which limitation/good settings in bmFont for a good bitmap font in GDevelop.

## Using my bitmap font in GDevelop

## Future development

This object is still experimental.

TODO
  • Talk about OpenType.js for a V2