mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-11 16:30:12 -06:00
Thai, Lao, Khmer and Burmese write no spaces, so a paragraph has no break opportunity and wraps where it overflows. That emergency break could start a line with a letter's trailing mark or end one with a leading vowel, splitting a syllable (and, when the break fell between the glyphs of one cluster, drawing it twice). - The break backs up to a boundary that keeps a mark with its letter and a leading vowel with the consonant after it; when the line's first character is in one, it carries the pair over to the next line instead. Lao leading vowels count too. - It only breaks between grapheme clusters now, never between glyphs of one. - Tests: a font-free unit test for the boundary rule, and a Thai wrapping test over 39 widths (skips without a Thai face). Co-Authored-By: DeepSeek V4.1 Flash (opencode) <noreply@opencode.ai> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>