refactor(ui): dedupe UTF-8 codepoint decoder

Three copies of the same routine: DisplayDriver::decodeCodepoint (added
in the FullscreenMsgView wrap fix) plus per-driver duplicates in
SH1106Display and GxEPDDisplay. Consolidate on DisplayDriver and have
translateUTF8Static also route through it instead of its own inline
decoder. Net: 63 lines removed, single source of truth.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-24 20:25:35 +02:00
co-authored by Claude Sonnet 4.6
parent 74764aed2b
commit 52a7081a13
5 changed files with 8 additions and 71 deletions
-1
View File
@@ -57,7 +57,6 @@ class GxEPDDisplay : public DisplayDriver {
uint8_t _full_refresh_interval = 0;
uint8_t _partial_count = 0;
static uint32_t decodeUtf8(const uint8_t*& p);
int16_t drawLemonChar(int16_t x, int16_t y, uint32_t cp, int sc);
uint8_t lemonXAdvance(uint32_t cp, int sc);
int scale() const { return (width() >= height()) ? 2 : 1; }