How To Get Very Small Pixel-Style Bitmap Fonts To Work In GDevelop
Originally published: July 23, 2023
This should help anyone struggling with this GDevelop problem. The following info can be adapted for bitmap fonts in general too.
- Download a suitable pixel font (check the licensing!) in TTF or OTF form
- Visit snowb.org – an online bitmap font generator
- Unpack the font file you downloaded from its ZIP or whatever (if you downloaded a zip, obviously), and click “ADD FONT FILE” on the left hand column. Choose the font file and upload it.
- Untick the “Auto Pack” option and make sure the “Fixed Size” option is ticked instead. The default size of 512×512 should be okay for your needs.
- Adjust the font size to what is recommended. Some fonts have a README in their zip (or download page) which may have the info you need on the smallest size it can be displayed at. The smallest might be something like 8px.
- Export as a BMFont XML zip file. Once downloaded, unpack it to your project’s assets folder.
- In GDevelop, create a Bitmap text object (or choose to edit an existing one that’s not working).
- In the bitmap font object editing window, select the XML file as the font file and then the accompanying graphic file (usually a PNG) for the other slot which is labelled “Bitmap atlas image”. Select Apply and then it should work.