
How can I properly render Tamil/Indic text in a Rust TUI (Ratatui/Crossterm)?
Hi everyone,
I'm building a terminal music player in Rust using Ratatui + Crossterm, and I'm having trouble rendering Tamil lyrics correctly.
As shown in the screenshot, Tamil combining characters such as ெ, ு, ் are appearing detached instead of being properly shaped and positioned.
Environment
- Rust
- Ratatui 0.29
- Crossterm 0.28
- Linux
- GNOME Terminal (VTE) / WezTerm
- Noto Sans Tamil
I've already verified that:
- The strings are valid UTF-8.
- Unicode grapheme segmentation works correctly.
- Display-width calculations are correct.
- A minimal Ratatui
Paragraphhas the same issue. - Even
println!("கென்னை விடு")shows the same problem in GNOME Terminal.
So I'm wondering:
Is proper OpenType/HarfBuzz shaping for Tamil possible inside a normal terminal grid?
If yes, what terminal/configuration/library should I use?
If terminal cells fundamentally cannot handle complex-script shaping, what is the recommended approach for a TUI? Would something like Kitty/Sixel + HarfBuzz/cosmic-text be appropriate?
Any advice from people familiar with Unicode shaping, HarfBuzz, VTE, or Rust TUI rendering would be greatly appreciated.
Thanks!