Commit Graph
5 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
Dylan M. Taylor 6a66b95cbc Enforce Rust coding standards via Clippy (#372)
* chore(lints): enforce workspace Clippy standards

Deny cognitive_complexity (threshold 30, rust:S3776), too_many_arguments and wildcard_imports workspace-wide. Existing violations are fixed in follow-up commits.

* refactor(keymap): isolate shortcut row rendering

* test(ui): cover dock command contract cases

* fix(keymap): remove unused shortcut layout state

* refactor(media): simplify container serialization tests

* docs: document workspace lint inheritance for new crates

* refactor(text): split Knuth-Plass line costing and path extraction

Brings knuth_plass under the workspace cognitive complexity limit.

* test(font-store): split lookup test by concern
2026-10-27 13:49:38 -04:00
aiongg f4c6718d68 craft-text: a locale's script must match the hyphenation patterns' script 2026-10-26 01:54:26 +00:00
aiongg a04bb9da2a craft-text: locale codes with a script or year subtag; Slovak data through feature unification 2026-10-25 19:37:05 +00:00
aiongg acf6f79739 craft-text: hyphenation, line-break segmentation, bidi and line breaking 2026-10-25 19:08:20 +00:00