View Full Version : I'm not on Windows, how do I do fonts!?

Aki Koskinen
04-13-2012, 10:40 PM
Although there's a question mark in the subject this post is actually a potential answer to that question.

My development platform is Linux.

On wiki there are some instructions (http://www.rtsoft.com/wiki/doku.php?id=proton:rtfont#how_to_make_a_new_font) how to make your own bitmap fonts that can be used with Proton. That documentation uses AngelCode's Bitmap Font Generator which is probably a fine tool (at least it's referenced multiple times in various places in the internet) but the downside of it is that it's a Windows program. I thought to try out running BMFont via Wine but didn't go that route in the end. Later on I read that it might not have been that easy anyway.

So I went out for a quest to find a similar application that could be run on Linux too. From StackExchange (http://gamedev.stackexchange.com/questions/2717/tool-to-create-a-bitmap-font-from-a-true-type-font) I found a multitude of suggestions. Long story short, I settled for FontBuilder (https://github.com/andryblack/fontbuilder) which is quite a new project. It uses Qt and I guess it's quite cross platform. Building it on Linux was a breeze. In no time I had it running.

FontBuilder is a bit rough on the edges. But it's open source so it's easy to enhance it if needed :D

FontBuilder has a multitude of formats it can output the font data. I found out that the strangely named output format Sparrow (a reference to the Sparrow framework (http://gamua.com/sparrow/)) is actually the same what BMFont outputs as its XML format (http://gamua.com/blog/2010/02/using-bitmap-fonts/). Since RTPack already knows how to read the raw text format of BMFont I figured that it can't be too far away from reading the XML format as well. The formats are actually quite close to each other syntactically.

So I went on and implemented BMFont XML format parsing to RTPack. It's in the svn already. It might not be too robust if you give it invalid XML files but it should handle valid XML files just fine.

PS. the compiled version of RTPack for Windows in the svn doesn't yet have this feature since I can't update that binary. I guess Seth needs to do that.

04-14-2012, 12:52 AM
Cool, sounds good! I'll update the Windows .exe when I get a chance.