Cells and cell styles had no first-baseline setting, so every cell set its first line by the
Ascent offset (the font's typographic ascender). IDML documents that set FirstBaselineOffset on a
cell style (CapHeight is common, often through a table style's body region) composed every row
taller than the document asked for. With a font whose typographic ascender is a full em (Avenir),
each row grew about 2.6 pt and long tables overset, losing their last rows.
- doc: Cell.first_baseline / first_baseline_min; CellStyle.first_baseline / first_baseline_min,
applied by CellStyle::apply_to and carried through resolve_cell_style's BasedOn chain.
- idml: FirstBaselineOffset and MinimumFirstBaselineOffset read and written on cells and cell styles.
- compose: a cell's text frame uses the cell's first baseline offset and minimum.
- engine: table.setCell, style.cell.create/edit take firstBaseline / firstBaselineMin; table.get
reports them; style.cell.create fromSelection captures them.
- tests: import through BasedOn and a table style's body region, a cell's own override, IDML round
trip; composer cap height vs ascent and a fixed minimum; command parameters and validation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
file.place, place.drop, placed media and Fixed Width text frame columns refuse a rect that overflows to infinity or NaN. Saving refuses a document with non-finite item geometry before writing anything, so a file that won't load is never written.
crates/engine/src/cmd/table.rs: add the PR's three commands before the branch's select commands, which keep their target descriptions (#803).
docs/gaps.md: keep the branch's text; Convert Rows leaves the list of missing menu items.
Graphic literals (cli perf, doc assets/item, engine datamerge/export/file/links/mathexpr/media/table/sample, epub, format, pdf, pptx, render, tools, ui-egui properties, and tests): name the branch's clip and wrap (#561, #381) and the PR's fill.
crates/doc/src/item.rs: Graphic keeps wrap and gains fill.
crates/idml/src/import.rs: read the image swatch, then the branch's styled FrameFittingOption lookup; the graphic keeps its wrap.
crates/idml/src/tests/assets.rs: keep both new tests.
crates/render/src/lib.rs: keep #362's crop-box sizing of placed PDFs and colour the resulting pixmap.
crates/render/tests/colorize.rs, crates/epub/tests/grouped_reading_order.rs, crates/compose/src/tests.rs: literals name the branch's Asset and Graphic fields.
crates/pdf/src/export.rs: the soft mask interpolates by the standard's raster mode (the branch has no per-exporter interpolate switch).
docs/gaps.md, docs/target-app-parity.md: status lines list both sides' changes; gap text keeps the clipping-path items and adds the image swatch.
Conflicts:
- crates/doc/src/lib.rs: DocSettings keeps the ruler origin and zero point fields and adds new_object; both defaults kept.
- crates/engine/src/cmd/style.rs: object.color keeps the batch's colour-model description, adds the nothing-selected sentence and the has_doc enable rule.
- crates/ui-egui/src/toolbar.rs: kept both tests (stroke gradient undo, new-shape colours from the proxy).
- ROADMAP.md: progress-log line moved under "Newest first." in the log's format.
Conflicts:
- crates/ui-egui/src/dialogs.rs: kept the branch's dialog code (wider New Document, Crop Amount, Cell Options) and added #1058's deletePages title, width, body, confirm arm and delete_pages() at the branch's indentation.
- crates/ui-egui/src/i18n.rs, i18n/{ar,de,it,ja,ka,pt_br,uk}.rs: kept both sides.
Primary Text Frame autoflow is still an open gap, and file.new {preset} goes through the same
builder. The TABS doc comment goes back onto TABS; the de and ja rows of the removed
"No saved presets yet" text go.
Next keeps its tree (the PR's earlier commits, with #683's Preview on top) plus the PR's two new commits, 3d91e6460 (a tab selects its first preset; Saved starts with [Default]) and c96d3e1fa (the eight-unit Units list; mobile presets turn on the primary text frame).
crates/engine/src/cmd/file.rs, crates/ui-egui/src/dialogs.rs, crates/ui-egui/src/lib.rs: keep next's side (Preview, new_document::create).
crates/ui-egui/src/new_document.rs: next's side plus the two new commits.
crates/ui-egui/src/i18n.rs, i18n/it.rs: next's rows minus the removed "No saved presets yet" text.
docs/target-app-parity.md: keep next's New Document line (with Preview).
ROADMAP.md: the New Document line was already there; keep one.
next's extract fills missing payloads with empty notes so the slice is a valid
story; main's test expected the slice to hold only the payloads the source had.
The pasted result is the same either way.
A click with the loaded text cursor on a text frame inside a group showed the
not-allowed cursor and did nothing: `Document::hit_item` walks the spread's
top-level items, so the hit was the group, and the group is not a text frame.
`item_hit` already looks inside a group, but only to answer whether the group
was hit at all -- the frame in it was never named. InDesign threads into it.
`hit_descendant` names it: the frontmost descendant under a point that a
predicate accepts, through nested groups, front to back and skipping hidden
children. `ToolContext::hit_text_frame` asks for a text frame, and the thread
tool resolves its target through it, falling back to the plain hit so a click on
anything else means what it meant before. `hit` is untouched, so selection still
picks the group.
One fix covers the cursor and the click, since `click` resolves through
`target`. The test asserts the cursor, that the click threads to the frame and
not to the group, that `hit` still returns the group, and that a group holding
nothing threadable is still refused.
Each included style gets pageNumberStyle, separatorStyle and sort.
toc.generate and toc.update apply the character styles to the page
number and the separator of every entry, and list the entries of a
sorted style alphabetically among their siblings, each with the
lower-level entries under it. Unknown character styles are errors.
Renaming or deleting a character style updates the definition. IDML
reads and writes PageNumberStyle, SeparatorStyle and Sort.
Moving, resizing and drawing snapped to page edges, margins, columns and
ruler guides but never to the bleed guide. `Spread::bleed_rect` now holds
the bleed rectangle (shared by the canvas, which drew it with its own
copy of the rule), and the guide pass offers its four sides.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit ad7a78d7439a906ab3545ff98801ee37b15be127)
Conflicts:
- crates/doc/src/build.rs: kept parent_page_of/parent_page/parent_guides,
sync_parent_margins and mark_differing_margins_local; inherited_guides(abs)
stays as a wrapper over parent_guides for the guide commands and dialogs.
Kept main's single_sided_page_shows_first_parent_page test next to
differing_margins_from_older_files_stay_local.
- crates/doc/src/page.rs (auto-merged): Spread::parent_page_index takes main's
rule (first parent page for left and single-sided pages).
- crates/engine/src/cmd/layout.rs: the parent block uses sync_parent_margins
instead of main's old-margins equality check; parent accepts prefix, label or
index; document pages set here become local. Main's
parent_margins_change_the_parent_and_follow_unoverridden_pages stays; added
applying_a_parent_gives_its_margins_and_local_margins_stay_local.
- crates/tools/src/snap.rs, crates/ui-egui/src/canvas.rs: guides read through
parent_guides (no per-page Vec); main's current_spread_page and
current_parent_page kept.
- crates/ui-egui/src/panels/properties.rs: main's parent-target margin fields.
- crates/format/src/lib.rs: upgrade and merge_duplicate_assets, then
mark_differing_margins_local.
- crates/engine/src/tests_idml.rs: both sides' tests.
- ROADMAP.md: main's file plus this PR's progress-log line.
Conflicts and how each was resolved:
- crates/idml/src/import.rs: main's linked_assets and insert_asset kept; the
crop is read beside main's page (PDFAttribute as a child or a property), and
linked_assets is keyed by (path, page, PdfCrop) so two crops of one page are
two assets.
- crates/idml/src/export.rs: PDFAttribute with PageNumber, PDFCrop and
TransparentBackground is written for every placed PDF, replacing main's
page > 0 block.
- crates/idml/src/tests.rs: main's file plus the `$ID/` font tests.
- crates/engine/src/cmd/file.rs: main's exact PDF page size, place cursor and
add_asset kept; Crop to stores the choice on the asset (the graphic spans
the box), so the place cursor's frame crop box is gone.
- crates/engine/src/cmd/{book,interchange}.rs: main's confined and reporting
imports, with the PDF crops resolved after them.
- crates/engine/src/cmd/print.rs: main's print_with, exporting with the
measured PDF boxes.
- crates/engine/src/cmd/links.rs: main's text links plus pdfCrop.
- crates/engine/src/cmd/{datamerge/fill,mathexpr,media,table}.rs,
crates/format/src/lib.rs: main's add_asset with the asset defaults.
- crates/engine/src/cmd/package.rs, crates/engine/src/tests_idml.rs: both
sides' tests.
- crates/fonts/src/fontdb.rs: main's style traits, looked up through
plain_family.
- crates/render/src/lib.rs: pdf_crop_box replaces pdf_page_box; main's
UserUnit test checks pdf_crop_box.
- crates/ui-egui/src/dialogs.rs: main's dialog with the content-bounds crops.
Also: Asset::same_file compares the PDF crop, so placing or saving no longer
merges two crops of one page; Asset literals added on main take the defaults;
main's PageNumber test checks the crop and that page 1 is written; new tests
a_pdf_page_placed_with_two_crops_imports_as_two_assets and
pdf_assets_with_different_crops_stay_apart.
Conflicts:
- crates/compose/src/lib.rs: kept main's line placement (line_metrics with first
baseline tops, baseline grid snap) and this branch's leading model and Aki Below
advance. The Hyphenation Zone check uses Composer::single_line(), so the Japanese
single-line composer gets the zone too.
- crates/idml/src/tests.rs: kept both tests at the conflict (composer kinds, text
stroke alignment).
Also resolved:
- crates/idml/src/import.rs: removed the package scan for a Japanese composer and the
drop of [No paragraph style]'s leading model; the import keeps the file's leading
model and the composer kind, and compose applies the model per paragraph.
- crates/idml/src/tests.rs: the default-leading-model test lays out the document and
checks Roman spacing under the non-Japanese composers and the Aki Below spacing
under the Japanese ones; a new test round-trips a Japanese composer document.