Read hyphenation exceptions from route-D sources

This commit is contained in:
gloamxun committed 2026-10-23 13:54:58 +08:00
1 parent e00e0038c1
commit f86b507615
3 files changed
+52 -5

No files matched your search

+3 -2
View File
@@ -77,7 +77,8 @@ honours the same offsets. The bounds and hyphen demerits are `ParagraphStyle`
fields mirroring `\pretolerance`, `\tolerance`, `\hyphenpenalty` and
`\exhyphenpenalty`, `\linepenalty`, `\adjdemerits`,
`\doublehyphendemerits`, `\finalhyphendemerits` and `\emergencystretch`,
plus document-level `\hyphenation` exceptions; `\hyphenpenalty` at 10000 or
plus document-level `\hyphenation` exceptions (the route-D service reads
`\hyphenation{...}` lines from the source); `\hyphenpenalty` at 10000 or
more disables hyphenation and switches the fallback to a first-fit scan.
`tests/oracle.rs` compares a matrix of measures (90, 100, 110, 120, 130, 150, 160, 180, 200, 220 and
@@ -346,7 +347,7 @@ Math coverage includes fractions/roots, scripts, `\left...\right` with body-scal
Paragraph units carry a `ParagraphFont`; `Unit::paragraph_with_face` and `Unit::paragraph_with_style_and_face` select Roman, bold, italic, mono, or sans. The corresponding Computer Modern TFM (`cmr10`, `cmbx10`, `cmti10`, `cmbxti10`, `cmtt10`, `cmss10`) supplies advances, kerns, ligatures, and italic correction for layout, while the display list and PDF select the matching Liberation face. `Engine::edit` preserves the face when reflowing an edited paragraph.
The crate currently has 289 unit tests plus seven route-D integration tests and twenty-seven oracle fixtures. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 428 tests (289 route-D unit, 7 route-D integration, 27 oracle, 71 v1 integration, 26 server, 4 v1 unit, 1 core unit, 3 binary units), with none ignored. v1 remains the live server path.
The crate currently has 289 unit tests plus seven route-D integration tests and twenty-seven oracle fixtures. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 429 tests (289 route-D unit, 7 route-D integration, 27 oracle, 71 v1 integration, 26 server, 4 v1 unit, 1 core unit, 4 binary units), with none ignored. v1 remains the live server path.
### M0 incremental demo