Swiss-DE names on ESP32 e-ink — Umlauts, Waveshare, and a three-day font problem
The project: a small e-ink display showing a random Swiss municipality name on wake, drawing from a list of all 2148 Swiss communes. Simple concept. Became a font problem.
Swiss municipality names contain umlauts — Küsnacht, Zürich, Thônex, Müstair. The Waveshare e-ink library ships with a bitmap font that covers ASCII only. No ä, ö, ü, no accents.
The font problem
Option 1: find a font that covers the characters I need. The Waveshare library uses its own bitmap font format. There are converters, but they’re finicky and the documentation is incomplete.
Option 2: use a different rendering approach. I ended up using Adafruit_GFX with a custom font generated by fontconvert — a tool from the Adafruit repository that converts TTF files to C headers.
# Convert a TTF to an Adafruit GFX font header
# Compile fontconvert first (requires FreeType)
./fontconvert NotoSans-Regular.ttf 24 32 255 > NotoSans24pt7b.h
The range 32 255 covers Latin-1, which includes the German and French characters I needed. The file size was about 40KB — acceptable for an ESP32.
The wiring
Waveshare 2.13” V3 (128x250, partial refresh). SPI connection:
BUSY → GPIO 4
RST → GPIO 16
DC → GPIO 17
CS → GPIO 5
CLK → GPIO 18
DIN → GPIO 23
The partial refresh is the feature that makes this usable — full refresh takes 2 seconds and flashes the display, partial refresh is nearly instant.
The result
Wakes on a timer every 30 minutes, picks a random commune from a 4KB array stored in SPIFFS, renders it in 24pt Noto Sans, goes back to deep sleep. Battery life: about 3 weeks on a 1000mAh LiPo.
The hardest part was the font. Once that was solved, everything else was straightforward.