BFL - Bernie's Font Library
BFL makes it possible to display high-quality anti-aliased fonts using OpenGL. This library uses the same techniques as Mark Kilgard's TexFont library. Follow the link for detailed information about texture mapped fonts using OpenGL.
BFL comes with two utilities, bfCreator and bfViewer. bfCreator converts any TrueType font into a BF font. bfViewer then displays these BF fonts. The bfViewer uses GLUT, and is therefore portable. However, the bfCreator uses the Windows API to convert the TrueType font to a bitmap. In the future, it may be adapted to use FreeType to do the conversion. Other portability issues like endianness are also not addressed yet.
The BFL library allows fonts to be stored in various formats: 1-bit intensity, 4-bit intensity, 8-bit intensity, 16-bit luminance-alpha and 32-bit rgba. The 1-bit representation is compact but exhibits aliasing. The 4-bit format allows 16 levels of anti-aliasing and is the recommended format. The bfCreator creates these 4-bit fonts by default. The 32-bit fonts can store full colour anti-aliased characters (glyphs), but requires the most memory and disk-space.
The font file stores all the glyphs in the font. The drawing routines are lazy, and only load the glyphs into graphics-card memory as they are needed. That is, each character is stored as a separate texture. The library also allows all glyphs to be consolidated into one texture to speed up the drawing (not yet fully implemented).
To get a good idea of the API, please look at the C/C++ header file. Also take a look at the screen shots below:
Download (28th September, 2000):