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.
31 lines
1.5 KiB
C
31 lines
1.5 KiB
C
// The contents of this file are generated by ./lib/EpdFont/scripts/build-font-ids.sh
|
|
#pragma once
|
|
|
|
#define NOTOSERIF_12_FONT_ID (85340443)
|
|
#define NOTOSERIF_14_FONT_ID (-1367885987)
|
|
#define NOTOSERIF_16_FONT_ID (1428909134)
|
|
#define NOTOSERIF_18_FONT_ID (-501438527)
|
|
#define NOTOSANS_12_FONT_ID (2057568286)
|
|
#define NOTOSANS_14_FONT_ID (-1589315735)
|
|
#define NOTOSANS_16_FONT_ID (1669013660)
|
|
#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.
|
|
// Guard against any hash accidentally producing 0.
|
|
static_assert(NOTOSERIF_12_FONT_ID != 0, "Font ID collision with sentinel");
|
|
static_assert(NOTOSERIF_14_FONT_ID != 0, "Font ID collision with sentinel");
|
|
static_assert(NOTOSERIF_16_FONT_ID != 0, "Font ID collision with sentinel");
|
|
static_assert(NOTOSERIF_18_FONT_ID != 0, "Font ID collision with sentinel");
|
|
static_assert(NOTOSANS_12_FONT_ID != 0, "Font ID collision with sentinel");
|
|
static_assert(NOTOSANS_14_FONT_ID != 0, "Font ID collision with sentinel");
|
|
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");
|