mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
fix(eink): pass UTF-8 through unchanged when Lemon font is active
drawTextCentered/Left/Right/Ellipsized all call translateUTF8ToBlocks before passing text to print(), which converted Cyrillic (and other Unicode) to block characters even when the Lemon font was selected. Override translateUTF8ToBlocks in GxEPDDisplay to skip conversion when _use_lemon is true — the Lemon/GFX font handles UTF-8 natively. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -86,6 +86,14 @@ public:
|
||||
}
|
||||
void setLemonFont(bool enabled) override { _use_lemon = enabled; _vw_dirty = true; }
|
||||
bool isLemonFont() const override { return _use_lemon; }
|
||||
void translateUTF8ToBlocks(char* dest, const char* src, size_t dest_size) override {
|
||||
if (_use_lemon) {
|
||||
strncpy(dest, src, dest_size - 1);
|
||||
dest[dest_size - 1] = '\0';
|
||||
} else {
|
||||
translateUTF8Static(dest, src, dest_size);
|
||||
}
|
||||
}
|
||||
bool begin();
|
||||
|
||||
bool isOn() override { return _isOn; }
|
||||
|
||||
Reference in New Issue
Block a user