mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-30 13:26:54 -06:00
These scripts write no spaces between words, so a paragraph was one word that only broke where it overflowed, mid-word (พัฒนาซอ|ฟต์แวร์). breaks::word_breaks finds the word starts inside each run of them with ICU4X's line segmenter (icu_segmenter 2.3, matching the icu_* crates in the lock), and break_lines may break there when the next glyph starts a new cluster. Where a run meets other text the UAX #14 subset decides as before; a word wider than its box keeps #1400's emergency break. Desktop uses the segmenter's dictionaries; the browser uses its LSTM models (about 0.39 MB of wasm instead of 1.86 MB, which the 24 MiB web gate can't take). ICU4X breaks between stray marks are filtered through safe_emergency_break, so junk input never splits a cluster. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LvG6DyK6i9Nvvsp3tp77UP