Font definition files

Files with this format: "fonts.*".

Font definitions. There are two font files. Fonts.fnt (game fonts) and fonts.utl (editor fonts?).

Table of Contents

Offsets

starting at 0x00

Structures

font_definition

Offsets

Offset: starting at 0x00

0x00: font_count: word = 0x3
Number of contained fonts
0x02: font_data_offsets: array[ 0x03 ] of word
Offsets of font data start in file.
  • This is start of pixel data. Font header precedes it.

Structures

Structure: font_definition

Size variable.

font_data_offset - 0x08: start_char_code: byte
Ascii code of the first font character.
font_data_offset - 0x7: end_char_code: byte
Ascii code of the last font character.
font_data_offset - 0x6: char_data_width: byte
Character data width in bytes.
font_data_offset - 0x5: unknown byte = 0
font_data_offset - 0x4: char_height: byte
Character height.
font_data_offset - 0x3: char_spacing: byte = 1
Space between characters (px).
font_data_offset - 0x2: line_spacing: byte = 1
Space between lines (px).
font_data_offset - 0x1: unknown byte = 0
font_data_offset - 8 - size: character_width: array[ end_char_code - start_char_code + 1 ] of byte
Font characters widths
  • Precedes font header.
font_data_offset: font_data: array[ character_count * char_data_width * char_height ] of byte
Font pixel data
  • Font char pixels are stored as bits.
  • Ie. char_data_width = 2, char_height=8: ([char1_byte]*2[char2_byte]*2 ...)*8