Westwood Font Format v2

From ModdingWiki
Jump to: navigation, search
Westwood Font Format v2
Eob font8.png
Format typeTileset
Max tile count128
Tile names?No
Minimum tile size (pixels)0×0 (global)
Maximum tile size (pixels)8×255 (global)
Plane count1
Plane arrangementLinear
Transparent pixels?Yes
Hitmap pixels?No
Supports sub-tilesets?No
Compressed tiles?No
Hidden data?Yes
Games (Character Generator)

This is the second type of bitmap font created by Westwood Studios, used in the Eye of the Beholder and BattleTech games. It is a 1-bit-per-pixel font with a fixed set of 128 characters. The format has a data index, and a header specifying global dimensions for all characters, though the width is limited to 8; the amount of pixels in a single byte.

File format


The font format starts with the following header.

Offset Data type Name Description
0x00 UINT16LE Size File size.
0x02 UINT16LE[0x80] Offsets Offset of the data block for each of the 128 symbols. Offsets are relative to the start of the file.
0x102 BYTE Height Font symbol height, in pixels.
0x103 BYTE Width Font symbol width, in pixels. Always smaller than 8.

Following this header is the data, normally one block per symbol, each symbol length being the height in bytes. However, later versions of the font optimised this by making the offsets for any identical symbols in the font refer to the same data, greatly reducing the data before index 0x20. It is very likely that that system can work with this format too, since the games generally just follow the header instructions for finding the data without doing any further checks.


To render a character from the font, you could use something like the following code:

C# .NET:

TFIXEDFONT fnt;      // assume this is loaded and initialized
Int32 x, y;          // position to draw the character
Int32 color;         // color of the text
Char c;              // the character to be drawn
UInt16 offset = fnt.Offsets[c];
for (Int32 h = 0; h < fnt.Height; h++)
    Byte line = fnt.Data[offset + h];
    Byte bit = 0x80;
    for (int w = 0; w < fnt.Width; w++)
        if ((line & bit) != 0)
            DrawPixel(x + w, y + h, color);
        bit = bit >> 1;


The following tools are able to work with files in this format.

Name PlatformView images in this format? Convert/export to another file/format? Import from another file/format? Access hidden data? Edit metadata? Notes
Westwood Font Editor WindowsYesYesYesNoN/A Created by Nyerguds