mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-28 15:58:12 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -203,7 +203,8 @@ void GxEPDDisplay::setCursor(int x, int y) {
|
||||
|
||||
void GxEPDDisplay::print(const char* str) {
|
||||
display_crc.update<char>(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));
|
||||
|
||||
Reference in New Issue
Block a user