diff --git a/src/helpers/ui/DisplayDriver.h b/src/helpers/ui/DisplayDriver.h index 07a53b1b..3eeb1b6b 100644 --- a/src/helpers/ui/DisplayDriver.h +++ b/src/helpers/ui/DisplayDriver.h @@ -34,7 +34,6 @@ public: virtual int getLineHeight() const { return 8; } // pixel rows per text line virtual void setLemonFont(bool) { } // no-op; overridden by displays that support Lemon virtual bool isLemonFont() const { return false; } - // Layout helpers — derived from font metrics and screen size. // Use these instead of hardcoded pixel values so layouts adapt to any display. int lineStep() const { return getLineHeight() + 2; } // row pitch: text + gap diff --git a/src/helpers/ui/GxEPDDisplay.cpp b/src/helpers/ui/GxEPDDisplay.cpp index c61ba3f2..7b1f1352 100644 --- a/src/helpers/ui/GxEPDDisplay.cpp +++ b/src/helpers/ui/GxEPDDisplay.cpp @@ -196,7 +196,9 @@ void GxEPDDisplay::print(const char* str) { if ((uint8_t)*p == 0xDB) { int cx = display.getCursorX(); int cy = display.getCursorY(); - display.fillRect(cx, cy - 8 * sc, 5 * sc, 8 * sc, _curr_color); + // Default GFX font: cursor is top-left of cell (fontAscender=0), so cy=original_y. + // Draw block at cy (not cy-8*sc — that formula assumes Lemon's baseline offset). + display.fillRect(cx, cy, 5 * sc, 8 * sc, _curr_color); display.setCursor(cx + 6 * sc, cy); } else { char tmp[2] = {*p, 0};