What is FontTool?

FontTool is a small utility which allows a fixed size bitmap image to be created from all the characters in a windows font. The ALL part is very important. The entire character set, including all foreign characters / symbols are produced into one bitmap 16 x 16 characters square. This is then output to a windows bitmap (.BMP file)

The utility was created to save the artists from having to align 256 characters (including foreign symbols) into a grid without getting the baseline of the characters wrong. It also generates a preview to allow you to see if the font you are about the use in your game has all the required foreign characters that you are going to need for the Mongolian / Icelandic version you are going to be asked for 2 weeks before the deadline.

Why bother?

The utility was mainly written to allow games developers to quickly use a font in their games. Rendering a True Type font in a realtime game is not an option, due to the way the font is rendered. The utility takes the font, renders the individual characters to a grid if 16x16 and saves them out in the easy to decode (uncompressed) windows BMP format. Once loaded by the game app, the characters can either be blitted to the screen directly, or used as textures for a font.

Who is this for?

Games programmers and artists mainly. The font is saved out in 2 colours (even in 24 bit mode). The artists can then apply all sorts of fancy effects to the output BMP using PhotoShop or the package of thier choice. Once the font is ready for use, the programmer loads is into the game / app and can do with is what they want.

 

Warning : Programmers only.

Using the font in-game.

If your reading this part, then this utility is probably not for you.

To decode the right character from the grid, first use the character size (shown in the main dialog).

To display a string, get the ASCII character you wish to decode (eg a = 65), then work out the

x and y position of the character graphic within the bitmap.

x = a&15

y = a>>4

x*=charwidth

y*=charheight

This computes the x,y position of the character within the image.

Then blit / bind this graphic to your texture.