Fixing the Fonts

The packed font system written by Jeff Laing has been broken since I refactored the bitmap system in Woopsi 0.40. I put together a new PackedFonts example project in order to identify and fix the problems, and the classes now work again. In addition, Woopsi now includes a “fonts” folder in its bonus directory, that includes 3 new fonts: Courier, CourierMono and Latha. Jeff wrote a demo with loads of fonts but I can’t seem to find the code, unfortunately, so I can’t add them to Woopsi.

I’ve also been hacking away at his bmp2font Python script. This is a Python 2 script that uses the devKitARM “grit” program to convert a BMP into a packed font class. It had a number of problems. Under Windows, it couldn’t find the grit program (the DEVKITARM environment variables use Linux-style paths, which don’t resolve properly). It didn’t put the resultant font classes into the WoopsiUI namespace (I must have introduced this after Jeff wrote the script), and it didn’t follow Woopsi naming conventions. All of these problems are now fixed.

In addition, there was still a minor clipping problem in the ListBox. This is fixed too.


Jeff on 2009-12-06 at 20:17 said:

I went digging around to see what I still had.


is the zipped directory of bitmap images you should be able to just push into the script for all the fonts I did. Some aren’t brilliant due to the lack of anti-aliasing.

Since you’ve change things, the actual .cpp/.h files in here


aren’t that useful but you’re welcome to them.

Ant on 2009-12-06 at 23:51 said:

Fantastic! The changes I’ve made are only minor, so I’m tweaking these fonts for the new system. Thanks for digging these up.