3D:QBF format
The QBF format (Queen Bitmap Font?) is an image resource format containing information about how to render different characters. This is the format used for fonts in OoT 3D.
Structure
This section documents the structure of the file format.
Header
Offset | Type | Description |
---|---|---|
0000 | char[4] | Magic ("QBF1") |
0004 | u16 | #characters |
0006 | u16 | Unknown (~#characters) |
0008 | u32 | Unknown |
000C | u8 | Bits per pixel (4 or 8) |
000D | u8 | Glyph width |
000E | u8 | Glyph height |
000F | u8 | Unknown (always 4?) |
Character metadata
Contains [#characters] rows (see header).
Offset | Type | Description |
---|---|---|
0000 | u16 | Character |
0002 | u16 | Glyph ID |
0004 | u8 | Unknown |
0005 | u8 | Unknown |
0006 | u16 | Unknown (always 0?) |
Each entry describes one character (specified by the [Character] field) associated with the corresponding bitmap (specified by the [Glyph ID] field). Glyph IDs are indices into the bitmap section.
Bitmap section
Contains one bitmap for each glyph. Each bitmap is [Glyph width]*[Glyph height]*[Bits per pixel]/8 bytes, regardless of the dimensions of the actual character. 4 bpp pixels are stored one nibble at a time, i.e. the higher nibble is leftmost. All pixel data is single-channel (greyscale or perhaps alpha).