Skip to content

SH1106: Cyrillic/UTF-8 support via U8g2_for_Adafruit_GFX overlay - #3222

Open
strasharo wants to merge 1 commit into
meshcore-dev:devfrom
strasharo:cyrillic-sh1106-support
Open

SH1106: Cyrillic/UTF-8 support via U8g2_for_Adafruit_GFX overlay#3222
strasharo wants to merge 1 commit into
meshcore-dev:devfrom
strasharo:cyrillic-sh1106-support

Conversation

@strasharo

@strasharo strasharo commented Aug 15, 2026

Copy link
Copy Markdown

Adds Cyrillic support for SH1106 displays (Wio Tracker L1, T-Beam Supreme for now), same technique ANTodorov used on their fork (display-utf8-support) for GxEPD/SSD1306 - keeps the stock Adafruit_SH110X/GFX driver untouched and layers U8g2_for_Adafruit_GFX on top just for non-ASCII text. ASCII still goes through the normal fast path.

Gated behind a DISPLAY_UTF8_FONTS build flag so it's opt-in, nothing changes for boards that don't set it.

Also threw in word-wrap + scrolling for long messages since without it a long Cyrillic message would just run off the bottom of the screen invisibly (the exact bug I ran into while testing this). Wio Tracker L1 gets manual scroll via the joystick up/down buttons too, since those were wired up but unused before.

Tested on real hardware - L1 Pro and T-Beam Supreme, both working (icons intact, wrap/scroll working, Cyrillic renders correctly).

I'd previously opened #3175 which did this by swapping the whole display backend to native U8g2, but that touched every board sharing SH1106Display and caused an icon-rendering regression from a bitmap byte-order mismatch. This is a much smaller, safer diff - closed that one and did this instead.

Renders non-ASCII text (Cyrillic etc) using U8g2_for_Adafruit_GFX layered
on top of the existing Adafruit_SH110X/GFX driver, gated behind a new
DISPLAY_UTF8_FONTS build flag so it's opt-in per board. ASCII text still
goes through the fast native Adafruit path.

Also adds word-wrap and scrolling for long messages (with manual
joystick up/down control on the Wio Tracker L1), and fixes a UTF-8-safe
truncation bug in drawTextEllipsized().

Enabled on wio-tracker-l1 and lilygo_tbeam_supreme_SX1262 for now; other
SH1106 boards are untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant