NW > Font File (FFNT)

OffsetSizeDescription
0x04Magic number ("FFNT")
0x42Endianness (0xFEFF)
0x62Header size (0x14)
0x84Version number
0xC4Filesize
0x102Number of sections
0x122Padding
0x14Sections. All sections are aligned to 4 bytes.

Info Section

Contains general information about the font.

OffsetSizeDescription
0x04Identifier ("FINF")
0x44Section size
0x81Font type
0x91Width
0xA1Height
0xB1Ascent
0xC2Line feed
0xE2Invalid char symbol index
0x101Unknown
0x111Unknown
0x121Unknown
0x131Character code
0x144Offset to texture section
0x184Offset to width section
0x1C4Offset to code map section

Texture Section

A font may consist of multiple texture sheets. The texture data of each sheet is stored directly after each other. Every cell contains a single glyph texture.

OffsetSizeDescription
0x04Identifier ("TGLP")
0x44Section size
0x81Cell width
0x91Cell height
0xA1Number of sheets
0xB1Unknown
0xC4Sheet size
0x102Baseline position
0x122Texture format
0x142Cells per row
0x162Cells per column
0x182Texture width
0x1A2Texture height
0x1C4Texture data offset
Texture FormatGX2SurfaceFormat
0GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8
12GX2_SURFACE_FORMAT_UNORM_BC4

Width Section

Contains width information for a range of glyphs.

OffsetSizeDescription
0x04Identifier ("CWDH")
0x44Section size
0x82First glyph index
0xA2Last glyph index
0xC4Size of width data
0x10Width data

Width Entry

OffsetSizeDescription
0x01Distance from left cell border to character
0x11Cell width
0x21Character width

Code Map Section

Assigns glyphs to a range of character codes.

OffsetSizeDescription
0x04Identifier ("CMAP")
0x44Section size
0x82First character code
0xA2Last character code
0xC2Mapping type
0xE2Padding
0x104Size of mapping data
0x14Mapping data

Code Map Type 0

OffsetSizeDescription
0x02base_index. The first character code is mapped to base_index. The second is mapped to base_index + 1, and so on.

Code Map Type 1

If a glyph index is 0xFFFF it indicates an invalid character.

OffsetSizeDescription
0x02Glyph index of first character code
0x22Glyph index of second character code
.........
...2Glyph index of last character code

Code Map Type 2

The first and last character code in the section header are ignored.

OffsetSizeDescription
0x02Number of entries
0x22Character code 1
0x42Glyph index 1
0x62Character code 2
0x82Glyph index 2
.........