Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Merge remote-tracking branch 'origin/main' into hyphenation-french-italian

moppeeerb71f83114f43
diff --cc crates/compose/Cargo.toml
index 884795e5c,2e9334b65..ea6a0bf42
--- a/crates/compose/Cargo.toml
+++ b/crates/compose/Cargo.toml
@@@ -21,7 -21,7 +21,7 @@@ log = { workspace = true
regex = { workspace = true }
fancy-regex = { workspace = true }
miniz_oxide = "0.8"
- hypher = { version = "0.1.8", default-features = false, features = ["alloc", "french", "greek", "italian", "portuguese", "spanish", "norwegian"] }
-hypher = { version = "0.1.8", default-features = false, features = ["alloc", "german", "greek", "portuguese", "spanish", "norwegian"] }
++hypher = { version = "0.1.8", default-features = false, features = ["alloc", "french", "german", "greek", "italian", "portuguese", "spanish", "norwegian"] }
[dev-dependencies]
designcraft-fonts = { workspace = true, features = ["testing"] }
diff --cc crates/compose/src/hyphen.rs
index 321df08ff,f079bc411..fc01dd375
--- a/crates/compose/src/hyphen.rs
+++ b/crates/compose/src/hyphen.rs
@@@ -5,10 -5,11 +5,14 @@@
//! `hyph-no.tex` from hyph-utf8 (Rune Kleveland, Ole Michael Selberg), permissive (see NOTICE);
//! Greek is `hyph-el-monoton.tex` 5.0 from hyph-utf8 (Dimitrios Filippou), LPPL or MIT, taken
//! under MIT. Those are the **monotonic** patterns, which is what `hypher` maps `el` to, so
-//! polytonic text hyphenates by them as well.
+//! polytonic text hyphenates by them as well. French is `hyph-fr.tex` 2.13 from hyph-utf8 (Daniel
+//! Flipo, Bernard Gaulle, Arthur Reutenauer), MIT; Italian is `hyph-it.tex` 4.9 from hyph-utf8
+//! (Claudio Beccari), LPPL or MIT, taken under MIT. A word with an elision (`l'imprimerie`)
+//! hyphenates after its apostrophe.
+ //! German uses `hyph-de-1996.tex` (2024-02-28, Deutschsprachige Trennmustermannschaft, MIT):
+ //! despite the filename, these are the reformed 2006 spelling patterns. Only the two 2006 reform
+ //! names and German locale codes without a reform year or with 2006 use this set. Traditional,
+ //! 1901 and unknown German variants have no automatic hyphenation; no old-spelling set is bundled.
//!
//! English lookup order for each word:
//! 1. the **dictionary** ([`Dictionary::en_us`]) — the public-domain Moby Hyphenator II word list
diff --cc docs/gaps.md
index 75706a162,e6a22d7a9..7e78c0eda
--- a/docs/gaps.md
+++ b/docs/gaps.md
@@@ -156,7 -156,7 +156,7 @@@ Kind: **F** feature · **U** UI/UX · *
- **Estimate:** 25–40 h.
### 13. Hyphenation and spelling languages (T, L)
- - **Missing:** hyphenation patterns for every language but English, Spanish, Portuguese, Norwegian, Greek, French and Italian; spelling for
-- **Missing:** hyphenation patterns for every language but English, Spanish, Portuguese, Norwegian, Greek and German (2006 reform); spelling for
++- **Missing:** hyphenation patterns for every language but English, Spanish, Portuguese, Norwegian, Greek, German (2006 reform), French and Italian; spelling for
every language but English. InDesign ships dictionaries for ~40 languages.
- **Estimate:** 30–60 h (permissively licensed patterns exist for most; spelling word lists need
licence review). **Doc:** [typography-parity.md](typography-parity.md)
diff --cc docs/localization-parity.md
index 68f500c7f,690ed23dc..df015a34b
--- a/docs/localization-parity.md
+++ b/docs/localization-parity.md
@@@ -68,9 -68,12 +68,12 @@@ eight of the twelve (cs, da, el, en_GB
## Document languages
InDesign 2026 hyphenates and spell-checks ~40 languages (Hunspell and Duden dictionaries).
- DesignCraft hyphenates **English, French, Greek, Italian, Norwegian, Portuguese and Spanish** and spell-checks **English** only. Text language
-DesignCraft hyphenates **English, Spanish, Portuguese, Norwegian, Greek and German (2006 reform)** and spell-checks **English** only. Text language
++DesignCraft hyphenates **English, French, German (2006 reform), Greek, Italian, Norwegian, Portuguese and Spanish** and spell-checks **English** only. Text language
can be set per paragraph and character (Properties, Character panel) and drives quotes and
locale shaping. See [typography-parity.md](typography-parity.md).
+ German hyphenation accepts `German: 2006 Reform`, `German: Swiss 2006 Reform` and `de` locale
+ codes without a spelling year or with `2006`. Traditional names, `de_DE_1901` and unknown
+ German variants have no automatic hyphenation; their German shaping and quotes are unchanged.
## Remaining effort
diff --cc docs/typography-parity.md
index ce80abb45,65086cfdb..9382443aa
--- a/docs/typography-parity.md
+++ b/docs/typography-parity.md
@@@ -36,7 -36,7 +36,7 @@@ Fidelity: **unmeasured** unless stated
| 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 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), Spanish (Bezos), Portuguese (hyph-pt), Norwegian (hyph-no), Greek (hyph-el-monoton), French (hyph-fr) and Italian (hyph-it), hyphenating after an elision (l'im-pri-me-rie); zone, limits, exceptions in the user dictionary; Hyphenate Across Column off keeps automatic hyphens off the last line of a column or frame | ~ | 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), Norwegian (hyph-no), Greek (hyph-el-monoton) and German 2006 (hyph-de-1996); zone, limits, exceptions in the user dictionary; Hyphenate Across Column off keeps automatic hyphens off the last line of a column or frame; discretionary U+00AD breaks with both composers regardless of automatic hyphenation and replaces pattern points within its word (#1955) | ~ | 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), Norwegian (hyph-no), Greek (hyph-el-monoton), German 2006 (hyph-de-1996), French (hyph-fr) and Italian (hyph-it); zone, limits, exceptions in the user dictionary; Hyphenate Across Column off keeps automatic hyphens off the last line of a column or frame; discretionary U+00AD breaks with both composers regardless of automatic hyphenation and replaces pattern points within its word (#1955) | ~ | 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, 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 | ✓ | ✓ | ✓ | |