This article describes the process of creating a bitmap’d font, using the GIMP image editor, the image-magick suite, and some home-brewed C-code. It also describes how to use the font in the Cocos2d-x/Android-Studio development environment.
For this project you will need:
- Bash (Sorry, moved from MSWindows to Ubuntu and have never looked back – script might be translatable to MSDOS),
- GIMP image editor (for creating the bitmap font strip),
- Image-magick suite (splits font strip from Gimp into individual images),
- A C++ compiler (g++, or clang are good – for compiling my code snippet),
- TexturePacker (free version, to glue all letters into sprite sheet),
- A Cocos2d-x project (to include your sprite-sheet into a game/app), and,
- the Android Studio IDE (to compile the Cocos2d-x project).
I actually wrote this post some time ago but since then my OS has had to be re-imaged and surprise, surprise, that’s where MySQL saves its database – fortunately my development environment was all on the /home partition. I’ve, in the interim, learned how to move my MySQL database to a safe location so hopefully that won’t happen again. I’ve also gotten smarter and installed a WordPress plugin to back my system up off-site (including the MySQL database).
Now, if I can remember what I wrote before…
- Creating a bitmap font using Gimp,
- Create a gold bitmap font,
- Break apart bitmap alphabet image,
- Combine individual letters into a plist/fnt/png file set,
- Use of bitmap font in Cocos2d-x.
- Some example font sprite sheets
Let me know how this works for you. I’ll try to help if you are having problems, time permitting.
If you have a bitmap font of which you are particularly proud let me know and I will link it on the example post above. Good luck!