mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-27 03:46:50 -06:00
Thai, Lao, Khmer and Burmese are written without spaces between words. Tools that know the words insert U+200B ZERO WIDTH SPACE so lines can break between them, and line breaking already treats it as a space. But justification counted every space-class char as a gap, so a justified paragraph got extra room at every U+200B: visible gaps between all its words, which is not how these scripts are justified. Item::stretches() (a space other than U+200B) is used for the justify gap count, the trailing width and the pen advance. Line breaking is unchanged. Test: on a justified line of words joined by U+200B and one real space, the extra room goes to the real space only; with no real space the line is laid out as if left-aligned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>