System Font

Revision as of 06:16, 16 September 2015 by Yellows8 (talk | contribs)

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:

Offset Size Description
0x0 0x80 Header
0x80 Font data size The actual font data. There's also unknown data following the original decompressed font data.

Header structure:

Offset Size Description
0x0 0x4 Normally value 0x2?
0x4 0x4 Normally value 0x1?
0x8 0x4 Decompressed font data size.
0xC 0x34 Normally all-zero?