Add 2-bit compressed rendering for large UI fonts

Refactor UI font generation to support different rendering modes based on size. Small UI fonts (12pt) use 1-bit rendering for crisp display and reduced flash usage. Large UI fonts (14pt) now use 2-bit compressed rendering to stay smooth when scaled up on touch/high-density boards. Extract font generation logic into reusable generate_ui_font() function.
This commit is contained in:
Justin Mitchell
2026-06-17 01:18:17 -04:00
parent 4a17d21d80
commit 4f55444f67
7 changed files with 7073 additions and 22 deletions
+2
View File
@@ -11,6 +11,7 @@
#define NOTOSANS_18_FONT_ID (37077304)
#define UI_10_FONT_ID (22918846)
#define UI_12_FONT_ID (1635686837)
#define UI_14_FONT_ID (1899049399)
#define SMALL_FONT_ID (674098198)
// Font ID 0 is reserved as the "not found" sentinel.
@@ -25,4 +26,5 @@ static_assert(NOTOSANS_16_FONT_ID != 0, "Font ID collision with sentinel");
static_assert(NOTOSANS_18_FONT_ID != 0, "Font ID collision with sentinel");
static_assert(UI_10_FONT_ID != 0, "Font ID collision with sentinel");
static_assert(UI_12_FONT_ID != 0, "Font ID collision with sentinel");
static_assert(UI_14_FONT_ID != 0, "Font ID collision with sentinel");
static_assert(SMALL_FONT_ID != 0, "Font ID collision with sentinel");