rpynx v0.1.0pre-release

Design

Button glyphs

How the loader draws controller button icons with the console's own font, without copying anything of Nintendo's.

Source docs/LOADER_UI.md
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 .nro or 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:

ButtonCode pointButtonCode point
AE0E0↑E0EB
BE0E1↓E0EC
XE0E2←E0ED
YE0E3→E0EE
LE0E4+E0EF
RE0E5−E0F0
ZLE0E6Left stick pressE104
ZRE0E7Right stick pressE105

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.

↑↓ move↵ openesc close