Arabic justifies by elongating the cursive joins between letters (the
kashida), not by widening word gaps. text-justify: kashida
existed in CSS and shipped in IE 5.5; no current browser implements it. Chrome
dropped the value at parse time and fell back to inter-word.
Same sample both ways: <div style="text-justify:kashida;
text-align:justify; text-align-last:justify">, Amiri font.
Live in the browser you are reading this in (unpatched).
kashida is unsupported, so it falls back to inter-word -- the
slack opens word gaps ("rivers") instead of elongating letters.
Screenshot of patched content_shell
(--enable-blink-features=CSSTextJustifyKashida). The same line
now fills the width by elongating the cursive joins -- a connected stroke,
not gaps.
A small corpus chosen to exercise the tricky cases (priority placement, non-joiners, ligatures, bidi, vowel marks). Each card: Rendered = live in your browser (unpatched, falls back); Expected = patched content_shell screenshot. Amiri font.
kashida was not a CSS keyword, so TextJustify::ParseSingleValue dropped it.TextJustify had no kashida method and no opportunity model for cursive joins.text-justify: kashida + new TextJustify::kKashida.U+0640 TATWEEL into the
shaping buffer only and reshape, so the font draws a connected stroke.
DOM text is untouched -- selection, search and copy are unaffected.ShapeResult::RemapKashidaToSource maps the reshaped indices back
onto the source text to keep paint/hit-test/selection consistent.
Ship follow-up: pick joins by Arabic priority rules / OpenType jstf,
and make line breaking stretch-aware for exact fill.
text-justify methods.