mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-28 20:26:57 -06:00
- hyphen: bundled en-US dictionary from the public-domain Moby Hyphenator II list (Grady Ward, Gutenberg #3204), front-coded + deflated (433 KB), with case/apostrophe/punctuation/compound handling and inflection inheritance; our own Liang patterns (19.5k, 129 KB) trained by a patgen-style trainer (hyphen::patgen, examples/hyphgen.rs) for unknown words; heuristic last. Discretionary hyphens replace automatic points. - breaker: prioritised word/letter/glyph-scaling glue in Knuth-Plass and layout; uncapped badness; hyphen limit as a hard constraint (hyphen-count states); hyphenation zone for ragged text (both composers); ragged hyphenation measured correctly; optical margin alignment; balance ragged lines; Knuth's node pruning. - compose: Keep Options (keep with next, keep all lines, keep first/last) via paragraph snapshots; desired spacing applied to all alignments; justified last lines shrink instead of overflowing; word shaping and hyphenation caches (300k-char story: ~40 ms warm, ~60 ms cold). - tests: golden corpus, perf (ignored), keeps, balance, optical, zone, limit, letter/glyph scaling, discretionary hyphens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
551 B
TOML
21 lines
551 B
TOML
[package]
|
||
name = "designcraft-compose"
|
||
version.workspace = true
|
||
edition.workspace = true
|
||
license.workspace = true
|
||
description = "DesignCraft text composition: paragraph composer (Knuth–Plass), hyphenation, justification, columns, threading, wrap"
|
||
|
||
[lints]
|
||
workspace = true
|
||
|
||
[dependencies]
|
||
designcraft-geom = { workspace = true }
|
||
designcraft-color = { workspace = true }
|
||
designcraft-doc = { workspace = true }
|
||
designcraft-fonts = { workspace = true }
|
||
log = { workspace = true }
|
||
miniz_oxide = "0.8"
|
||
|
||
[dev-dependencies]
|
||
proptest = { workspace = true }
|