From 7a72faf740313cce2eeffabb4ce42b147c4b5536 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 7 Oct 2026 00:54:16 -0400 Subject: [PATCH] IDML: rules follow the text colour; defaults for auto-size, numbering and table fills Paragraph rules can be in Text Color: they take the colour of the paragraph's first character (rule above) or last character (rule below). That is the default, and IDML maps RuleAboveColor / RuleBelowColor "Text Color" both ways. Defaults for what a file leaves unset, in the model and in IDML import: text frames auto-size from the centre, numbered lists don't continue across stories, and alternating table and table style fills start Black 20 % then None 100 %. Kashidas (DefaultKashidas / KashidasOff) import and export. A tint of -1 is the colour's own tint everywhere tints are imported (underline and strikethrough, footnote rules included), and tints are capped at 100 %. Format 1 documents load as saved: they wrote rules, text frame options, lists and table fills in full, so nothing relied on the old defaults. --- ROADMAP.md | 4 +- crates/compose/src/lib.rs | 20 ++++-- crates/compose/src/tests.rs | 26 +++++++ crates/doc/src/attrs.rs | 6 +- crates/doc/src/item.rs | 4 +- crates/doc/src/lib.rs | 8 +-- crates/format/src/lib.rs | 21 ++++++ crates/idml/src/export.rs | 9 ++- crates/idml/src/import.rs | 66 ++++++++--------- crates/idml/src/names.rs | 8 +++ crates/idml/src/tests.rs | 136 +++++++++++++++++++++++++++++++++++- 11 files changed, 251 insertions(+), 57 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 2bc132df3..8bd7fb234 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -12,7 +12,7 @@ DesignCraft aims at full Adobe InDesign parity — and to be better: faster, ope - Pen tool, Direct Selection anchor/handle editing, rotate from corners, Rotate/Scale/Shear tools, Eyedropper, snapping & smart guides, Align/Distribute, Find/Change (text + GREP), Story Editor, Paragraph Style Options, Effects panel, hidden characters, native macOS menu bar, measured InDesign 2026 look (Medium Dark): Properties sections per selection state, 21 pt spinner fields with arithmetic, Contextual Task Bar, inverse (black) text selection, Pages panel with drag-and-drop reorder / parent apply, Layers panel with per-object rows. - Tools: Selection (click, marquee, move, Alt-duplicate, resize handles), Direct Selection, Type (draw frame, click caret, select, type), Rectangle/Ellipse/Polygon (+ frame variants), Line, Hand, Zoom. - PDF export (krilla): real selectable text with embedded font subsets, DeviceCMYK/RGB + spot Separations, bleed boxes, crop/bleed marks + page info, pages or spreads, PDF/A-2b (PDF/X-4 output intent pending) — `file.exportPdf`, File › Export PDF…, `designcraft-cli run --export out.pdf`. -- IDML interchange (`designcraft-idml`): export and import of swatches, styles, fonts, preferences, parent spreads, spreads/pages, frames, groups, images (embedded or linked), formatted threaded stories; attributes a file leaves unset take InDesign's defaults (Keep Lines Together at start/end of paragraph, 12 pt corners) — opens in InDesign 2026 and round-trips InDesign-exported files (`file.exportIdml`, `file.openIdml`, File → Export IDML…, CLI `--in x.idml` / `--export x.idml`). +- IDML interchange (`designcraft-idml`): export and import of swatches, styles, fonts, preferences, parent spreads, spreads/pages, frames, groups, images (embedded or linked), formatted threaded stories; attributes a file leaves unset take InDesign's defaults (Keep Lines Together at start/end of paragraph, 12 pt corners, paragraph rules in Text Color, auto-sizing from the centre, numbered lists restarting in each story, alternating table fills Black 20 % / None; a tint of −1 is the colour's own) — opens in InDesign 2026 and round-trips InDesign-exported files (`file.exportIdml`, `file.openIdml`, File → Export IDML…, CLI `--in x.idml` / `--export x.idml`). - Tables (M8): tables anchored in stories (header/footer/body rows, merged cells, per-edge strokes, fills + alternating fills, insets, vertical justification, at-least/exact row heights); composed into the text column (columns scale to fit, rows break across columns/frames with repeating headers/footers, overset); rendered, exported to PDF (real text) and IDML (export + import); Table menu, Table panel, Create Table dialog, caret/typing/Tab navigation and cell selection in cells; `table.*` commands. - Hyperlinks (text or frames → URL / e-mail / page) and bookmarks, exported as PDF link annotations and outline. - EPUB 3 (reflowable) export: stories in reading order, CSS from paragraph/character styles, images, navigation (`file.exportEpub`, CLI `--export x.epub`). @@ -97,7 +97,7 @@ DesignCraft aims at full Adobe InDesign parity — and to be better: faster, ope - Split Window / New Window (`window.split`, `window.newWindow`, Window ▸ Arrange): two side-by-side views of the document with their own zoom, scroll and render cache. New Window puts the second view in its own OS window (an egui viewport; a floating window on the web). - Transparency flattener (`file.exportPdf {flatten: high|medium|low|ppi}`, Edit ▸ Transparency Flattener Presets): each object involving transparency becomes an opaque image of its area over what's beneath it, so everything else stays vector (spreads with transparent parent items are rasterised whole). - Video and sound (place .mp4/.mov/.webm/.mp3/.wav…, `media.options/get`, Media panel): media frames show a poster or placeholder on screen, in print and in PDF, and export as HTML5 `