DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Merge #565: fix(compose): enable Norwegian hyphenation patterns
aionggfbf0fabd1a7c
diff --cc crates/compose/Cargo.tomlindex 2225367cc,de678b37f..c1a7f9bc7--- a/crates/compose/Cargo.toml+++ b/crates/compose/Cargo.toml@@@ -19,9 -17,8 +19,9 @@@ designcraft-doc = { workspace = truedesigncraft-fonts = { workspace = true }log = { workspace = true }regex = { workspace = true }+fancy-regex = { workspace = true }miniz_oxide = "0.8"- hypher = { version = "0.1.8", default-features = false, features = ["alloc", "portuguese", "spanish"] }+ hypher = { version = "0.1.8", default-features = false, features = ["alloc", "portuguese", "spanish", "norwegian"] }[dev-dependencies]designcraft-fonts = { workspace = true, features = ["testing"] }diff --cc docs/typography-parity.mdindex 4a244fdd2,e86167592..2743164b4--- a/docs/typography-parity.md+++ b/docs/typography-parity.md@@@ -35,10 -35,10 +35,10 @@@ Fidelity: **unmeasured** unless stated| Paragraph Composer | Adobe's multi-line composer | Knuth–Plass total fit, fitness classes, hyphen penalties | ~ | same family of algorithm, Adobe's weights unknown; breaks will differ on some paragraphs || Single-line Composer | greedy | greedy with the same ranges | ✓ | || World-Ready composers | Paragraph / Single-line World-Ready | RTL, Arabic and bidi in the main composer | ~ | Indic scripts (Devanagari etc.) shape through harfrust but are untested |-| Justification | word/letter spacing, glyph scaling min/desired/max, single-word, last line | all of these | ✓ | a justified line with a tab now justifies after the tab (#284) |+| Justification | word/letter spacing, glyph scaling min/desired/max, single-word, last line | all of these | ✓ | a justified line with a tab justifies after the tab (#284); set per paragraph in Type › Justification… and the Paragraph panel menu (#531) |- | Hyphenation | per-language dictionaries (~40), zone, limits, capitalized, last word, across columns | Liang patterns: English (trained from the public-domain Moby list) and Spanish (Bezos); zone, limits, exceptions in the user dictionary | ~ | other languages don't hyphenate (#87 reported "doesn't work") |+ | Hyphenation | per-language dictionaries (~40), zone, limits, capitalized, last word, across columns | Liang patterns: English (trained from the public-domain Moby list), Spanish (Bezos), Portuguese (hyph-pt) and Norwegian (hyph-no); zone, limits, exceptions in the user dictionary | ~ | other languages don't hyphenate (#87 reported "doesn't work") || Spelling | per-language dictionaries | English (Moby) + document/user dictionary | ~ | |-| Kerning | Metrics, Optical, manual, none | Metrics, manual, none | ~ | **Optical treated as Metrics** (#181): imported display text sets wider and can overset |+| Kerning | Metrics, Optical, manual, none | Metrics, Optical (outline-based: pairs pulled towards the font's stem gap, `crates/compose/src/optical.rs`), manual, none | ~ | Optical is an approximation of Adobe's algorithm (#181), not a match: imported display text can still break differently || Tracking, scale, skew, baseline shift | ✓ | ✓ | ✓ | || OpenType features | ligatures, discretionary, swash, fractions, ordinals, figures, small caps, stylistic sets, positional forms | through harfrust | ✓ | || Variable fonts | axes in Character panel | named instances and free axis values; PDF embeds the instance | ✓ | |