Commit Graph
2 Commits
Author SHA1 Message Date
Dylan M. Taylor d8568d6cfc text: keep hyphenation and line-breaking work linear and bounded (#560)
* text: keep hyphenation and line-breaking work linear and bounded

- hyphen::dict: inflate with a 64 MiB limit (MAX_INFLATED).
- hyphenate_word: walk the sorted break offsets with one iterator.
- patgen::score: index expected breaks once per word.
- patterns: FxHasher's finish rotates the multiplied bits down so packed
  keys sharing low bits spread over buckets; at most MAX_PATTERNS (1M).
- linebreak: Sums precomputes each item's next box or forced break,
  so next_start is a lookup instead of a scan per candidate.

* address review: refuse to serialize hyphenation dictionaries past the inflate limit
2026-11-03 23:04:30 -05:00
aiongg acf6f79739 craft-text: hyphenation, line-break segmentation, bidi and line breaking 2026-10-25 19:08:20 +00:00