From 10b2629b36f81f67c58a33fec56e7436d698e065 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sun, 24 May 2026 19:45:19 +0200 Subject: [PATCH] fix(eink): gate Lemon print path on _text_sz == 1 setTextSize(2/3) switches GFX to non-Lemon fonts (built-in scaled or FreeSans18pt). The Lemon path bypassed GFX entirely and rendered glyphs at size 1 scale, shrinking splash version and clock when Lemon font was active. Refresh CODE_REVIEW.md: remove resolved issues (signed-int timing vars, abs() no-op, XBM CRC, loadPrefs nesting, lock-screen LPP thrash, reply prefix raw UTF-8), add new findings (upstream-merge surface, virtual width()/height() per glyph, page_order sentinel), list enhancement ideas. Co-Authored-By: Claude Sonnet 4.6 --- src/helpers/ui/GxEPDDisplay.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers/ui/GxEPDDisplay.cpp b/src/helpers/ui/GxEPDDisplay.cpp index 3996f421..551640f9 100644 --- a/src/helpers/ui/GxEPDDisplay.cpp +++ b/src/helpers/ui/GxEPDDisplay.cpp @@ -203,7 +203,8 @@ void GxEPDDisplay::setCursor(int x, int y) { void GxEPDDisplay::print(const char* str) { display_crc.update(str, strlen(str)); - if (_use_lemon) { + // Lemon path only for sz=1 — setTextSize(2/3) switches GFX to non-Lemon fonts. + if (_use_lemon && _text_sz == 1) { int16_t cx = display.getCursorX(); int16_t cy = display.getCursorY(); int sc = (width() >= height()) ? 2 : 1; @@ -267,7 +268,7 @@ void GxEPDDisplay::drawXbm(int x, int y, const uint8_t* bits, int w, int h) { } uint16_t GxEPDDisplay::getTextWidth(const char* str) { - if (_use_lemon) { + if (_use_lemon && _text_sz == 1) { uint16_t total = 0; const uint8_t* p = (const uint8_t*)str; while (*p) total += lemonXAdvance(decodeUtf8(p));