Design
Button glyphs
How the loader draws controller button icons with the console's own font, without copying anything of Nintendo's.
On this page
On the Switch, the loader shows the console’s own button icons, the ones the HOME menu, hbmenu and sphaira use.
Where they come from
- They are glyphs in the system’s shared font “Nintendo Extended” (
plGetSharedFontByType(PlSharedFontType_NintendoExt)), drawn through tiny_ttf next to the text font. - The font is loaded from the console at run time, as hbmenu and sphaira do. Nothing of Nintendo’s is copied into the
.nroor the repository. - On the Mac, the mockups show drawn chips (dark letters on light discs) as stand-ins, because Nintendo’s font is not on the Mac.
Code points
As sphaira’s nvg_util.cpp uses them:
| Button | Code point | Button | Code point |
|---|---|---|---|
| A | E0E0 | ↑ | E0EB |
| B | E0E1 | ↓ | E0EC |
| X | E0E2 | ← | E0ED |
| Y | E0E3 | → | E0EE |
| L | E0E4 | + | E0EF |
| R | E0E5 | − | E0F0 |
| ZL | E0E6 | Left stick press | E104 |
| ZR | E0E7 | Right stick press | E105 |
hbmenu’s dark theme uses a filled set for A, B, X, Y (E0A0–E0A3) and for + and − (E0B3, E0B4). Which set to use is to be decided on hardware.
Sizing and fallbacks
- Icons are sized to 26 px and centred in their own line box (
icon_font()), so they line up with the text beside them. - A stick direction shows the stick’s icon; the D-pad arrows are the console’s own.
- SL, SR and the stick directions keep the drawn chips, which are also the fallback when the shared font cannot be loaded.
- No LVGL symbol glyphs are used: the console’s font answers for their code points with an empty box.