System Font

System Font

During system boot, the system-font is loaded by NS to LINEAR-memory(in the original 0x14000000 vmem region) which always gets allocated at SYSTEM_memregion+0. Due to it being located there, all of this is GPU accessible. The BCFNT is loaded from the font title for the system region into that memory. During loading, the font-data is modified: the magic-num at fontdata+0 is changed from “CFNT” to “CFNU”, and all file offsets are converted to addresses in this allocated linearmem. Processes can get the sharedmem_handle+vaddr for mapping the sharedmem for this via APT:GetSharedFont.

With font-data title-version v0 for USA/EUR/JPN, the size of this entire sharedmem is 0x332000-bytes.

Shared mem structure:

OffsetSizeDescription
0x00x80Header
0x80Font data sizeThe actual font data.
0x80 + Font data size0x332000 - 0x80 - Font data sizeThis is leftover data from decompression operation. During the font loading process, compressed data is loaded to sharedmem + 0x332000 - compressed_size_aligned_to_4, and then is decompressed to sharedmem + 0x80. Compressed data at the end that doesn’t get overwritten by decompressed data remains in the shared memory

Header structure:

OffsetSizeDescription
0x00x4Status. 1: loading system font

2: system font loaded

3: failed to load system font

0x40x4Region. Indicates which system font archive is loaded 1: region JPN/EUR/USA (archive 0004009B00014002)

2: region CHN (archive 0004009B00014102)

3: region KOR (archive 0004009B00014202)

4: region TWN (archive 0004009B00014302)

0x80x4Decompressed font data size.
0xC0x74Normally all-zero?

Unicode Private Use characters #

Some of these characters are used for tutorial message boxes and notifications; they can also be generally used in Mii names, application titles, etc.

Most of these originated in the “icons” tab of the DS’s standard software keyboard, and were extensively used in its firmware UI.

Private Use Area
U+
E00x
E01x
E02x
E03x
E04x
E05x
E06x
E07x

Table courtesy 🔗 Wikibooks