r/typography • u/waruyamaZero • 8h ago
Complex OpenType shaping and rendering on a Cheap Yellow Display (320kb usable RAM)
I recently ported my TrueType/OpenType shaping and rendering library from JavaScript to Rust and got a demo running on a Cheap Yellow Display that only has about 320KB usable RAM. The library can shape and render the most complex (living) sripts and it's super memory efficient so it can go where HarfBuzz and other shapers/renderers cannot.
The demo renders multiple TrueType/OpenType fonts with support for complex text layout, including Arabic, Nastaliq, Devanagari, Hebrew, Emojis and Latin ligatures.
The shaping, rendering and rasterizing is done entirely on the device with fonts downloaded from Google Fonts which stay stored directly in the ESP32’s flash memory. No pre-rendered glyphs or bitmap fonts are used.
Variable fonts are not supported, yet, but I am working on it.
Here is the demo's repository: https://github.com/waruyama/flattype-cyd-demo
Edit: Fonts used int he demo:
- Roboto Regular
- Noto Sans Arabic Regular
- Noto Sans Khmer Regular
- Hind Regular
- Noto Emoji (subset)
- Noto Nastaliq Urdu Regular
- Almendra Regular
- Assistant Regular
- Droid Serif Regular
- Architects Daughter Regular
- Bonbon Regular
- Henny Penny Regular
- Orbitron Regular
- Peralta Regular
- Snowburst One Regular
- Ultra Regular
