Arabic text in a Windows terminal
Terminals are built on a grid of equal cells, which suits Latin text and fights Arabic. Najm can draw Arabic in a monospace font with one config line, but it does not reorder lines right to left yet.
What works today
- Works: Arabic letters take their joined forms, and the font line below keeps them on the cell grid.
- Does not work yet: a line stays in left-to-right cell order, so Arabic in plain command output reads backwards. Some pairs, such as lam-alef, also draw badly. Najm has no bidirectional layout today.
Set the font in three steps
- Install the current Cascadia Code release. The copy that ships with Windows has no Arabic.
- Add this line to
%LOCALAPPDATA%\najm\config.ghostty:
font-codepoint-map = U+0600-U+06FF,U+0750-U+077F,U+08A0-U+08FF,U+FB50-U+FDFF,U+FE70-U+FEFF=Cascadia Code NF
- Press Ctrl+Shift+, to reload the config.
Why the font line matters
The default terminal fonts have no Arabic, so Windows draws it in Segoe UI. That font is proportional, so it sits unevenly in the grid. The line above sends every Arabic block to a monospace font that has them, and the text lines up.
To see which font each letter comes from, run:
najm +show-face --string="مرحبا"
Read this page in Arabic
Najm's site has an Arabic version.