Skip to content

spec text justify auto

Keith Cirkel edited this page Feb 13, 2026 · 1 revision

Summary

Documents with "text-align: justify" are not interoperable today, so any specs involves some costs. We need to make a choice which costs to take and which not to.

Following criteria are out of scope of this discussion:

  • text-align is not justify. The choice does not make any differences in this case.
  • has lang attribute. The spec says UA may tailor by the content language.
  • text-jusitfy: inter-word. The spec defines behavior in this case.

Options

Expand CJ: Expand ideograph (i.e., between ideograph and any), but not Hangul Solid CJK: Not expand ideograph nor Hangul Compromise: A compromised algorithm, spacing varies by the content of line Reintroduce inter-ideograph: Add text-justify: inter-ideograph back

Current Behavior

Table of expansions:

Test Gecko Expands Trident Webkit Blink
Mac Win/Android/Opera
untagged default (screenshots) None None +Han +Kana -Hangul None
Japanese default (screenshots) +Han +Kana -Hangul
Korean default (screenshots) None
untagged inter-ideographic (screenshots) None +Han +Kana +Hangul

Future Possibilities

Document Type Expand CJ not K Solid CJK Compromise
text-justify: inter-ideograph (for IE5+) A D* B*
Chinese/Japanese (100%) A D B
Korean (Hangul only, 70-80%) A A B
Korean (Hangul+Han, 20-30%) C A B
Korean (Han only, 1-10%) A D B

Letters represent quality of results

  • Adding inter-ideograph can make this A.

Regressions

Document Type Engine Expand CJ not K Solid CJK Compromise
text-justify: inter-ideograph (for IE5+) Webkit o -* -*
Trident o -* -*
Blink o/+ -*/o -*/+
Gecko + o +
Chinese/Japanese (100%) Webkit o - -
Trident + o +
Blink o/+ -/o -/+
Gecko + o +
Korean (Hangul only, 70-80%) Webkit o o -
Trident o o -
Blink o o -
Gecko o o -
Korean (Hangul+Han, 20-30%) Webkit o + + and -
Trident - o -
Blink o/- +/o + and -/-
Gecko - o -
Korean (Han only, 1-10%) Webkit o - -
Trident + o +
Blink o/+ -/o -/+
Gecko + o +
  • + indicates better
  • - indicates worse
  • o indicates same

Clone this wiki locally