System Font

From 3dbrew
Revision as of 22:01, 13 September 2015 by Yellows8 (talk | contribs) (Created page with "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 bein...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.

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?