mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-16 07:12:43 +00:00
Compose: match the CJK gate's Hangul set to the breaker's; drop the ROADMAP hunk
This commit is contained in:
1 parent
466f42b179
commit
4536e5d4cf
4 files changed
+39
-24
No files matched your search
+1
-2
@@ -4,7 +4,7 @@
|
||||
- 2026-10-23: placed-artwork layer options survive IDML and native round trips per placement, independently of shared assets. Unsupported visibility overrides are explicit import/preflight/PDF warnings; format 4 prevents older native readers from silently discarding them. Rendering parity is still open; see [graphic-layer-options.md](docs/graphic-layer-options.md).
|
||||
- FID1: PDF export normalizes mixed emitted gradient color spaces to RGB with an explicit warning; homogeneous device-space gradients retain their components. Linear/radial, midpoint, archival and print policies have synthetic regression coverage.
|
||||
|
||||
> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-11-01 · **Change:** minor (placed graphic layer-option preservation and explicit rendering warnings; previously minor, Compose: the JIS X 4051 禁則処理 push-in/push-out priorities are applied by both composers over CJK text — the empty default and Push In First compose as push-in-first as in InDesign's Japanese default, Push Out First, Push Out Only and adjustment-amount as their names say; Latin paragraphs are not biased; preflight reports only unknown values; File ▸ Open Recent; .indd and .indt open through indd-utils; text threads by hand; the alpha gate waits on Primary Text Frame page fixes; Japanese print, import and table controls localized; Live corners (#186); Optical kerning from outlines (#181); window and menu quit confirmation; failed writes preserve live save and collection state; spring-loaded Zoom navigation; orderly native exit recovery; Pages panel parents; cancelable macOS Dock Quit; text stroke behind fill; Based on Parent; object styles carry effects; table anchors keep their own paragraphs; grouped HTML/EPUB reading order; Links source paths; XLSX cached cell values retain numeric precision and text) · **Target:** Adobe InDesign 2026
|
||||
> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-11-01 · **Change:** minor (placed graphic layer-option preservation and explicit rendering warnings; File ▸ Open Recent; .indd and .indt open through indd-utils; text threads by hand; the alpha gate waits on Primary Text Frame page fixes; Japanese print, import and table controls localized; Live corners (#186); Optical kerning from outlines (#181); window and menu quit confirmation; failed writes preserve live save and collection state; spring-loaded Zoom navigation; orderly native exit recovery; Pages panel parents; cancelable macOS Dock Quit; text stroke behind fill; Based on Parent; object styles carry effects; table anchors keep their own paragraphs; grouped HTML/EPUB reading order; Links source paths; XLSX cached cell values retain numeric precision and text) · **Target:** Adobe InDesign 2026
|
||||
- AR1.1: Kashida justification tests verify space fallback without Tatweel fonts using an isolated font database, while retaining elongation assertions when fonts support it.
|
||||
|
||||
- AR1: Arabic IDML controls now retain character direction, kashida switches, diacritic offsets/forms, paragraph policy values and independent story/table directions. Shaping preserves joining context and script/language selection; paragraph-level bidi, contextual digit conversion, mark-safe elongation, RTL columns/tables and physical column insertion have regression coverage. Vendor-specific justification and diacritic presets remain explicit preflight warnings; see docs/arabic-typography.md.
|
||||
@@ -446,7 +446,6 @@ Newest first.
|
||||
- **2026-10-23** · File › File Info… edits the document's Document Title, Author, Description, Keywords, Copyright Notice and Copyright Info URL (`file.info`), and the document saves them. PDF export (PDF/X-4 and Print Booklet included) writes the title, author, description and keywords into the PDF's document information and XMP. EPUB export takes the title and author from File Info, and HTML export takes the title. A title or author given to the export replaces File Info's, and an empty Document Title leaves the document's name as the title. No readiness percentage change.
|
||||
- **2026-10-23** · Save and export dialogs (Save As, Save a Copy, Export PDF and the other exports, Package, libraries and books) start in the active document's folder once it has been saved, and for a document never saved in the folder of the last file saved or exported, remembered across sessions (#1653). A folder deleted since falls back to the system's choice. No readiness percentage change.
|
||||
- **2026-10-22** · Autoflow (Shift-click with the loaded text cursor, autoflow on Place, `text.thread {autoflow}`) fills the pages that follow before it adds any, as InDesign does: one frame per column on each following page, whatever else the page holds, then new pages at the end of the document. It inserted pages right after the story's last frame, in front of the document's own pages. Frames it set past the end of the text go again; a page the document had stays, and a page autoflow added only for such a frame goes with it. Smart Text Reflow of the primary text frame is unchanged. No readiness percentage change.
|
||||
- **2026-10-22** · Compose: the JIS X 4051 禁則処理 push-in/push-out priorities are applied, not just preserved. Both composers bias the break candidates by the selected type over CJK text: push-in-first (the empty default and the UI's Push In First, as in InDesign's Japanese default) rates breaks that would stretch the line worse than ones it can reach by compressing, push-out-first the other way, push-out-only leaves no compression at the line end, and adjustment-amount takes the smallest adjustment. Latin paragraphs are not biased by the default. New regressions pin the default = push-in-first, the push-out-only line-end fits, the mode mapping and the Latin non-bias; `docs/cjk-typography.md` now lists the modes as implemented and preflight reports only unknown values. No readiness percentage change.
|
||||
- **2026-10-18** · German text hyphenates using the MIT-licensed 2006 reform patterns (`hyph-de-1996.tex`) through `hypher`. Explicit 2006 names and plain/2006 locale codes reach both composers; traditional and unknown spelling variants stay unhyphenated. Tests cover this distinction, umlauts, ß, compounds, reformed ck/st breaks and paragraph limits. Six of InDesign's ~40 hyphenation languages. No readiness percentage change.
|
||||
- **2026-10-16** · Edit › Keyboard Shortcuts imports a set saved by InDesign's Show Set (.txt, Windows or Mac key names, UTF-8 or UTF-16): matched commands take its Default shortcuts or lose theirs, other commands give up keys it takes, and a report lists what it changed and the items it could not match (`window.importShortcuts`, #1180). Tool keys stay fixed. No readiness percentage change.
|
||||
- **2026-10-23** · Translations: a missing string shows in English and fails no test; `cargo xtask i18n-report`, run by `cargo xtask ci`, prints the missing strings per language. Tests keep duplicate-key and placeholder checks and the language mechanics (lookup, context captions, plural captions, right-to-left). No readiness percentage change.
|
||||
|
||||
@@ -286,13 +286,18 @@ fn kinsoku_allows(a: char, b: char) -> bool {
|
||||
!NO_START.contains(b) && !NO_END.contains(a)
|
||||
}
|
||||
|
||||
/// Hangul: Jamo, compatibility Jamo, the syllables, and Jamo Extended-A/B. Shared with the
|
||||
/// paragraph's CJK gate so the two classifications cannot drift apart.
|
||||
pub(crate) fn is_hangul(c: char) -> bool {
|
||||
matches!(c as u32, 0x1100..=0x11FF | 0x3130..=0x318F | 0xA960..=0xA97F | 0xAC00..=0xD7FF)
|
||||
}
|
||||
|
||||
/// Hangul, and Han ideographs (hanja) in Korean text: Korean is set word by word (KLREQ), so
|
||||
/// these letters break like Western ones, at spaces.
|
||||
fn korean_letter(g: &Glyph) -> bool {
|
||||
let c = g.ch as u32;
|
||||
let hangul = matches!(c, 0x1100..=0x11FF | 0x3130..=0x318F | 0xA960..=0xA97F | 0xAC00..=0xD7FF);
|
||||
let han = matches!(c, 0x3400..=0x4DBF | 0x4E00..=0x9FFF | 0xF900..=0xFAFF | 0x20000..=0x3FFFF);
|
||||
hangul || (han && g.lang.is_some_and(|t| designcraft_doc::language_subtag(t) == "ko"))
|
||||
let c = g.ch;
|
||||
let han = matches!(c as u32, 0x3400..=0x4DBF | 0x4E00..=0x9FFF | 0xF900..=0xFAFF | 0x20000..=0x3FFFF);
|
||||
is_hangul(c) || (han && g.lang.is_some_and(|t| designcraft_doc::language_subtag(t) == "ko"))
|
||||
}
|
||||
|
||||
/// Is the place between glyphs `a` and `b` one where CJK text may break (next to an ideograph, kana
|
||||
|
||||
+19
-18
@@ -3407,24 +3407,25 @@ fn paragraph_is_cjk(glyphs: &[Glyph]) -> bool {
|
||||
/// Is `c` CJK text (the scripts the 禁則 line-start/line-end rules are about): ideographs, kana,
|
||||
/// CJK punctuation and full/half-width forms, bopomofo, Hangul.
|
||||
fn is_cjk_char(c: char) -> bool {
|
||||
matches!(
|
||||
c as u32,
|
||||
0x1100..=0x11FF
|
||||
| 0x2E80..=0x2FFF
|
||||
| 0x3000..=0x30FF
|
||||
| 0x3100..=0x318F
|
||||
| 0x3190..=0x33FF
|
||||
| 0x3400..=0x4DBF
|
||||
| 0x4E00..=0x9FFF
|
||||
| 0xA000..=0xA4CF
|
||||
| 0xAC00..=0xD7AF
|
||||
| 0xF900..=0xFAFF
|
||||
| 0xFE30..=0xFE4F
|
||||
| 0xFF00..=0xFFEF
|
||||
// Extension B 以降 (U+20000..)。breaker の Han の判定と同じ範囲にして、
|
||||
// 補助面だけの段落でも禁則の指定が効くようにする
|
||||
| 0x20000..=0x3FFFF
|
||||
)
|
||||
// Hangul comes from the breaker's classification (Jamo including Extended-A/B, syllables),
|
||||
// so the two sets agree. Bopomofo is 0x3100..=0x312F; 0x3130..=0x318F is Hangul.
|
||||
breaker::is_hangul(c)
|
||||
|| matches!(
|
||||
c as u32,
|
||||
0x2E80..=0x2FFF
|
||||
| 0x3000..=0x30FF
|
||||
| 0x3100..=0x312F
|
||||
| 0x3190..=0x33FF
|
||||
| 0x3400..=0x4DBF
|
||||
| 0x4E00..=0x9FFF
|
||||
| 0xA000..=0xA4CF
|
||||
| 0xF900..=0xFAFF
|
||||
| 0xFE30..=0xFE4F
|
||||
| 0xFF00..=0xFFEF
|
||||
// Extension B and later (U+20000..): the same range as the breaker's Han check,
|
||||
// so the kinsoku settings apply to a paragraph of supplementary-plane text alone.
|
||||
| 0x20000..=0x3FFFF
|
||||
)
|
||||
}
|
||||
|
||||
/// Desired word spacing, letter spacing and glyph scaling apply to every line (any alignment).
|
||||
|
||||
@@ -5888,6 +5888,16 @@ fn supplementary_ideograph_paragraph_keeps_the_kinsoku_gate() {
|
||||
assert!(!is_cjk_char('A'));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hangul_jamo_extended_blocks_count_as_cjk() {
|
||||
// `is_cjk_char` takes Hangul from the breaker's classification, so the syllables and the
|
||||
// Jamo Extended-A/B blocks count as well: a Hangul-only paragraph keeps its 禁則 priority.
|
||||
for c in ['\u{A960}', '\u{A97F}', '\u{D7B0}', '\u{D7FF}'] {
|
||||
assert!(is_cjk_char(c), "U+{:04X} is Hangul", c as u32);
|
||||
}
|
||||
assert!(is_cjk_char('\u{3105}'), "bopomofo is still CJK");
|
||||
}
|
||||
|
||||
/// Shape `text` as a one-paragraph story with the default font and styles: the glyph list the
|
||||
/// composition classifies before `split_drop_cap` and `prepend_label`.
|
||||
fn shape_for_script_test(text: &str) -> Vec<Glyph> {
|
||||
|
||||
Reference in new issue
Block a user