5.1 Binary Format (.d3f - D3-TUI Font)
Header (16 bytes):
- Magic: "D3TF" (4 bytes)
- Version: 1 (2 bytes)
- Texture width: uint16_t
- Texture height: uint16_t
- Cell width: uint8_t
- Cell height: uint8_t
- Reserved: 2 bytes
Glyph table (256 entries × 16 bytes = 4096 bytes):
For each ASCII character (0-255):
- tex_x: uint16_t
- tex_y: uint16_t
- tex_w: uint8_t
- tex_h: uint8_t
- bearing_x: int8_t
- bearing_y: int8_t
- advance: uint8_t
- reserved: uint8_t
Texture data: Variable size (tex_width × tex_height × 2 bytes for ARGB1555)