Skip to content

Instantly share code, notes, and snippets.

@kokoye2007
Created April 25, 2026 11:38
Show Gist options
  • Select an option

  • Save kokoye2007/8c21c8ba2d72192f97b1150b3e57befc to your computer and use it in GitHub Desktop.

Select an option

Save kokoye2007/8c21c8ba2d72192f97b1150b3e57befc to your computer and use it in GitHub Desktop.
Myanmar Font Render in Terminal

Myanmar Text in Terminal (Linux / macOS)

Problem

  • Myanmar = complex script (stacking + shaping)

  • Issues:

    • missing fonts
    • no Harfbuzz shaping
    • wrong glyph width
    • bad font fallback
    • monospace limitation

Requirements

  • Terminal must support:

    • Harfbuzz (complex text shaping)
    • font fallback
  • System must have:

    • proper Myanmar fonts

Recommended Fonts

  • Noto family:

    • Noto Sans Myanmar
    • Noto Sans Myanmar UI
    • Noto Sans Mono

Install (Debian/Ubuntu):

sudo apt install fonts-noto-core fonts-noto-extra fonts-noto-ui-core fonts-noto-ui-extra

Fontconfig (Linux)

~/.config/fontconfig/fonts.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>Noto Sans Mono</family>
      <family>Noto Sans Myanmar</family>
      <family>Noto Sans Myanmar UI</family>
    </prefer>
  </alias>
</fontconfig>

Apply:

fc-cache -fv

Terminal Support Matrix

Terminal Status Notes
KDE Konsole ✅ Best Works out-of-box
WezTerm ✅ Good Stable shaping
Ghostty ⚠️ Medium Needs config
GNOME Terminal ⚠️ Medium Depends on fontconfig
Kitty ⚠️ Medium Needs tuning
Alacritty ❌ Weak Shaping issues
xterm.js ✅ Good Browser rendering

Ghostty Config

~/.config/ghostty/config

font-family = "Noto Sans Mono"
font-family-bold = "Noto Sans Mono"
font-family-italic = "Noto Sans Mono"

font-fallback = "Noto Sans Myanmar,Noto Sans Myanmar UI"

line-height = 1.2

Notes:

  • avoid Nerd Fonts (Myanmar glyph issues)
  • disable ligatures if needed

macOS Notes

  • Use:

    • Noto Sans Myanmar
    • Myanmar MN
  • iTerm2 / Terminal:

    • fallback font important
    • rendering less consistent than Linux

Myanmar Developer Tools / Projects

  • mterm

    • Browser-based terminal (xterm.js approach)
    • Uses web rendering → better Myanmar shaping
    • Useful workaround when native terminals fail
  • myanso

    • Native-focused Myanmar terminal experiment
    • Open-source project targeting better Unicode handling
    • Available builds (e.g. macOS) + source on GitHub (Facebook)
  • Htain Lin Shwe

    • Myanmar developer active in Unicode ecosystem
    • Also created tools like Rabbit Converter (Zawgyi ↔ Unicode) (GitHub)

Test

echo "မြန်မာစာ စမ်းသပ်နေပါတယ်"

Known Limitations

  • alignment issues in:

    • vim
    • htop
  • column width mismatch

  • stacked glyph spacing imperfect


Recommendation

  • Best:

    • KDE Konsole
    • WezTerm
  • Acceptable:

    • Ghostty (with config)
  • Alternative approach:

    • xterm.js / mterm (web rendering)

Summary

  • Not a terminal problem only

  • Key factors:

    • shaping engine (Harfbuzz)
    • font + fallback
    • width handling
  • Myanmar dev community is actively solving this via:

    • browser terminals (mterm)
    • native experiments (myanso)
  • Native terminals can support Myanmar well with proper setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment