1. Code

Thunderfish Bitmap Font Library

This library includes two classes that facilitate the usage of bitmap fonts to draw text in XNA projects. A bitmap font is a set of characters drawn to an image that can be rendered as text. Why using bitmap fonts instead of SpriteFont (TrueType) fonts? Bitmap fonts allow you to utilize fonts that are much more unique and interesting, including colors and shapes that TrueType fonts can't. See the test project below for an example.

The BitmapFont class loads the bitmap font image(s) and processes them into a usable set of character images. It provides methods for drawing strings using the loaded images.

The BitmapFontAnimation abstract class and subclasses provide functionality for animating a bitmap font string on a character-by-character level, allowing text to wiggle or bounce each character. This class is designed to be overridden to allow you to create your own animation types.

The font image included in this sample project was created by Scraggle (Craig McFarlane). For more information on this image, and many more usable font images, see this post.


This library is provided free of charge for commercial and noncommercial use. No warranty of fitness for any purpose, express or implied, is given.


Download BitmapFont class
Download BitmapFontAnimation class
Download BitmapFont example project

Comments, bug reports, questions? Send 'em over! forms@brianmacintosh.com