Skip to content

Font Sets (FONTS.FNT)

Font definition files used for UI text rendering.

Extension
FONTS.FNT (game fonts), FONTS.UTL (editor fonts)
Location
Game root
Byte order
Little-endian (16-bit)
Size
Variable — 3 fonts; header at offset 0x00 (font_count word + 3 offset words)
Compression
None
Magic
None — font_count = 3 at 0x00
Status
Partial
Source
Wendigo — X.fnt.xml

Canonical source: X.fnt.xml (Wendigo’s Darklands repo)

Files

FileDescription
FONTS.FNTMain game fonts (3 fonts)
FONTS.UTLEditor fonts (possibly unused in shipping game)

File Layout

Offset 0x00:  word    font_count = 3
Offset 0x02:  word[3] font_data_offsets  — file offset to the pixel data of each font

Font Definition Structure

Each font’s header precedes its pixel data. Given font_data_offset for a font:

LocationSizeFieldDescription
offset - 8 - nncharacter_widths[]Per-character pixel width; n = end_char_code - start_char_code + 1 bytes
offset - 0x081start_char_codeASCII code of the first defined character
offset - 0x071end_char_codeASCII code of the last defined character
offset - 0x061char_data_widthCharacter data width in bytes (bitmap row stride)
offset - 0x041char_heightCharacter height in pixels
offset - 0x031char_spacingHorizontal spacing between characters (= 1)
offset - 0x021line_spacingVertical spacing between lines (= 1)
offsetvariesfont_dataPixel bitmap data

Pixel Data Layout

Size: character_count × char_data_width × char_height bytes.

Characters are stored in order, row by row. Each row of each character occupies char_data_width bytes. Pixels are stored as bits (1 = set, 0 = clear).

Confidence

Medium-high. Documented in X.fnt.xml.