Skip to content

Bitmap Font Machine – Box of Rats’ First Product

As previously mentioned, I have lately been pushing hard to get Bitmap Font Machine released. This is the first product by Box of Rats, which owes its existence to my inability finding a suitable bitmap font generator to support me in my current game development.

Bitmap fonts are fonts that are, as opposed to vector based fonts such as TrueType, stored in a bitmap. This has the disadvantage that scaling such fonts can result in quality loss, but when used in games, especially those based on 3D technology, they are pretty useful. Each glyph of a bitmap font can be texture mapped on a rectangle by specifying the proper coordinates within that bitmap. On systems with 3D display hardware (nowadays this means most systems), this is significantly faster than rendering a vector font. Another advantage is that the game does not need to be shipped with that that font in case a custom font is used, nor does the target system need to be able to display the original font format.

Now the straightforward way would be to create that font in Photoshop (or in my case, GIMP) and I did that for the first three times or so. When I write code, I get tired and bored after doing the same thing for the third time (and will start to look for a better way). Another thing was that this procedure was only practical for fixed width fonts like Courier, where I could simply derive the glyph positions from the equidistant grid, so I could not use proportional fonts.

As a result of this, I started a research on bitmap font generators and quickly found quite a number of tools for the purpose, but none of those quite fit was I was looking for. Practically every one was written for the same operating system. Redmond is around the corner, but I am nowadays mainly a Mac and Ubuntu User. I also wanted a very simple user interface where I could just hit a few buttons and immediately get a good feeling about how text would look like in my game.

After coming to the conclusion that I would not find the tool I was looking for, I decided to write it myself. I also decided to write it in Java, because I knew that it would allow me to control font rendering and writing on client machines easily and in a platform-independent way. I also thought that I should make the tool available for other game developers as well and that’s how Bitmap Font Machine came alive. I have retargeted it to run as a browser applet, so I did not need to worry about distribution  and provided some sample code (which is currently more for demonstration than for production purposes) to show how to use the bitmap fonts on Mac OS X or SDL/OpenGL based systems.

So far, this tool has been very useful to myself, and it allows me to try out different fonts much easier and quicker. I hope that it can be useful to other people as well. I plan to improve Bitmap Font Machine over time as I progress further with my game development projects, and additional suggestions are definitely welcome.

Post a Comment

Your email is never published nor shared. Required fields are marked *