The experience of rendering Arabic typography and its technical debt
Points and comments are a snapshot, not live.
Arabic typography on the web lacks justification by elongating letter strokes, relying instead on broken word-spacing, due to missing shaping engine support.
Arabic script justification traditionally works by extending connecting strokes between letters (kashida or tatweel), not by stretching spaces between words. This system, codified by Ibn Muqla in the 10th century and refined over six centuries, produces flush margins on both sides of a line while keeping word spacing uniform. Modern web browsers apply CSS text-align: justify to Arabic text, stretching spaces instead, producing ragged margins that violate design intent.
The root cause lies in how Arabic rendering works: each letter has four positional forms (isolated, initial, medial, final), selected at render time by a shaping engine using OpenType features. Most browsers lack full kashida support. Additional complications include three distinct numeral systems (Western, Arabic-Indic, Extended Arabic-Indic) with different bidirectional behavior, and legacy Unicode presentation forms (U+FB50-U+FEFF) that render identically to modern encodings but don't match in searches, creating hidden data bugs in customer databases.
What commenters are saying
Commenters recognized the article as excellent and noted that text rendering generally works well for scripts that shaped the defaults, while complex scripts face fragmented support across the stack. One commenter mentioned an academic treatment of Arabic justification; another linked to a disconnected-font approach that was attempted but abandoned. A developer claimed to have implemented Arabic shaping from scratch and suggested stretching individual glyphs during rendering could solve justification, though another noted this requires coordination across shaped runs. One minor query about whether "most-significant-first" meant layout direction rather than reading convention. General sentiment was appreciation for documenting an under-discussed problem affecting hundreds of millions of readers.