mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-01 22:26:49 -06:00
Text: Optical kerning spaces pairs from their outlines
Optical kerning was treated exactly like Metrics: the font's kern pairs and nothing else, so text set with Optical in InDesign came out wider, rewrapped and went overset in tightly fitted frames. Now the font's pairs are turned off for Optical text and each pair is spaced from its outlines (crates/compose/src/optical.rs): every glyph's ink is sampled into 28 bands across the em, the pair's mean and smallest ink gap over the bands both glyphs ink are compared with the font's stem-to-stem gap (the pair nn, or HH then oo), and the pair moves 60% of the way towards it, keeping 30% of that gap and moving at most -0.12 or +0.06 em. Latin, Greek and Cyrillic letters, digits and Western punctuation take part; spaces, marks, missing glyphs, right-to-left runs, upright and tate-chu-yoko glyphs and pairs across a fallback font keep their font spacing. Profiles and references are cached, bounded. Tests: AV, To and r. close up and nn stays; HH closes up under Optical but not Metrics (fails on main); every change on a pangram stays within the bounds and spaces keep their width; profile, gap, adjustment and character-class unit tests. Docs: typography parity Kerning row and remaining effort, gap 4, ROADMAP milestone 6 and progress log. Fixes #181.
This commit is contained in:
+4
-4
@@ -1,6 +1,6 @@
|
||||
# Where DesignCraft falls short of InDesign
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** minor (stage re-normalized to pre-alpha by the core-workflow gate; earlier today: major, first version: gaps from the full re-measure and the issue tracker) · **Target:** Adobe InDesign 2026 (21.6)
|
||||
> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-10-11 · **Change:** minor (Optical kerning from outlines (#181); 2026-10-10: stage re-normalized to pre-alpha by the core-workflow gate; earlier today: major, first version: gaps from the full re-measure and the issue tracker) · **Target:** Adobe InDesign 2026 (21.6)
|
||||
|
||||
Every known shortfall against InDesign 2026, one entry each, ranked by how much it stops an
|
||||
InDesign professional from doing real work. This is the work list: agents pick from the top.
|
||||
@@ -69,13 +69,13 @@ Kind: **F** feature · **U** UI/UX · **T** typography · **FF** file format ·
|
||||
### 4. Composition isn't compared with InDesign (T)
|
||||
- **Missing:** an oracle harness: the same synthetic stories set by InDesign 2026 (observed
|
||||
black-box, results kept under `plan/`) and by DesignCraft, comparing line breaks, overset and
|
||||
frame fit. Known differences: optical kerning falls back to metrics, so imported text sets
|
||||
wider (#181); a frame goes overset when descenders don't fit, InDesign needs only the baseline
|
||||
frame fit. Known differences: optical kerning is an outline-based approximation, not Adobe's
|
||||
algorithm (#181); a frame goes overset when descenders don't fit, InDesign needs only the baseline
|
||||
(#180); setting the text language was missing (#130; Language is now in Properties, #145, the issue is still open); "hyphenation doesn't work"
|
||||
(#87).
|
||||
- **Impact:** an opened IDML reflows: different line breaks, different page count, overset text.
|
||||
Professionals notice on the first page.
|
||||
- **Estimate:** 80–140 h (harness 20–30, optical kerning 15–25, then fixes by cluster).
|
||||
- **Estimate:** 70–125 h (harness 20–30, optical kerning tuning 5–10, then fixes by cluster).
|
||||
- **Doc:** [typography-parity.md](typography-parity.md)
|
||||
|
||||
### 5. Startup crashes on some graphics hardware (S, H)
|
||||
|
||||
Reference in New Issue
Block a user