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>
The merge compiled, but six tests showed where the two branches meant
different things. Fixes, in order of consequence:
- Format version: both branches had independently defined version 2 —
here for retained EPS sources, on main for pinned Keep Lines Together
and drop cap defaults, with an `upgrade` that runs below 2. Writing 1
for documents without EPS then re-ran that upgrade on load and rewrote
their paragraph styles, so saving and reloading changed the document.
EPS now asks for version 3 and everything else stays at 2.
- place.drop into a frame: main turned Auto-Fit off so that resizing a
frame crops rather than refits, and this branch had carried the older
FillProportionally along while moving the geometry out of the edit.
Main's behaviour is the intended one.
- save() compacts unreferenced assets now, so the format test has to
place its EPS for the version sniff to see it at all.
- EPUB entries are named from the asset's file stem (asset_path), not
its bare id: images/logo-<id>.png.
- Command parameters are validated strictly, so the PDF page test sends
each command only the parameters it takes.
- The relink batch's "commits once" check read a process-wide revision
counter, which a test running beside it can advance; the single undo
step is what actually shows it committed once.
The EPS place tests move to cmd/file/eps_place_tests.rs: they write real
files, and main's file-system guard reads src files without seeing inline
#[cfg(test)] modules, but exempts _tests.rs ones.
Four sites already on main that `cargo xtask ci` cannot get past with the
current toolchain; each rewrite is the one clippy suggests and changes no
behaviour. `!x.is_some_and(f)` becomes `x.is_none_or(!f)`, and pdf_bounds
folds `!(a && b) || !c` into `!(a && b && c)` by De Morgan.
Unrelated to the merge they are committed beside; separated so that merge
stays a merge.
Resolve 12 conflicted files. Where both sides changed the same code:
- format: keep main's bounded-read load_zip (MAX_ENTRIES, read_entry) and
this branch's u64 version reporting, so a version above u32::MAX is named
as written rather than clamped. Both sides had fixed the same truncation.
- render: main's natural_size supersedes image_natural_size (it already
reads an EPS bounding box and also handles PDF pages); callers in table
and data merge now use it.
- images: keep the DSC-aware header scan and (atend) trailer lookup, take
main's classic-Mac line endings, and carry its overflow guard into
parse_box. eps_proxy draws main's simple rectangles before falling back
to the placeholder, still over a retained EPS source.
- engine/file: take main's placement shape (add_asset, crop box geometry,
place cursor, finite_rect, object effects) and keep this branch's
validate_placement in both branches; edit() works on a clone and commits
only on Ok, so validating inside it stays all-or-nothing.
- engine/links: keep building the replacement before edit() so a file that
cannot be read leaves the document untouched, and move main's crop_pdf
refresh into relinked_asset, which both relink and update go through.
- engine/export: EPS preview warnings join the font-embedding warnings
rather than shadowing them.
- idml: an EPS element keeps ActualPpi (its pixels are a preview raster);
main's PDF exclusion is unchanged.
Cargo.lock regenerated. Tests and doc strings from both sides kept.
Holding Cmd/Ctrl with a non-selection tool borrows whichever of Selection and Direct Selection was chosen last, instead of a fixed tool per tool family. The session records the last chosen selection tool; the busy() guard stays.
tooling.rs: kept #366's IME handling (with_ctx passes the session; a press ends the composition first) and #1002's borrowed tool, which pointer, key, overlay, cursor and wants_text reach through gesture_tool().
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/ui-egui/src/dialogs.rs: the branch's dialog body is laid out differently; the Color Theme body goes into its match beside Text Frame Options, and its OK label into the branch's translated labels.
crates/ui-egui/src/menus.rs: keep the branch's Effects dialog opener and add the Color Theme opener.
crates/ui-egui/src/panels/swatches.rs: keep both menu rows (Swatch Options… from #416, Color Theme…).
crates/tools/src/tests.rs: the PR's Graphic literal names clip, wrap and fill.
docs/agents.md: keep both sections.
ROADMAP.md: the PR's line moves under "Newest first."; its copy of an existing 2026-10-13 line is dropped.
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/engine/src/cmd/edit.rs: kept the batch's copy_items and paste_origin and added #1011's preview function; kept paste_tests and added preview_tests after it.
- crates/ui-egui/src/panels/properties.rs: the axis-slider test sets the family through the batch's apply_font (FontPick), which replaced apply_font_family.
- ROADMAP.md: progress-log line moved under "Newest first."
Conflicts:
- crates/engine/src/cmd/text.rs: took #1000's unit_at split of select_at; its two revision bumps use the batch's bump_revision().
- crates/tools/src/text.rs: kept the batch's preedit and table-border fields, BorderDrag and the press-time border check; #1000's `unit` replaces `unit_selected`, and the drag branch checks the border first, then #1000's unit drag.
Conflicts:
- crates/engine/src/cmd/text.rs: kept #531's paraMixed report and used #1060's override counts (paraOverrides, charOverrides, characterStyleOverrides) in it.
- crates/ui-egui/src/panels/styles.rs: kept both row-menu items and both sets of tests; #1064's test passes #1060's new `overridden` argument.
- docs/ui-parity.md: kept both paragraphs and both change notes; Redefine Style is no longer listed as a gap (#1064).
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/engine/src/cmd/style.rs: both add a test module at the top of the file; kept #1061's application_inheritance_tests and #1064's redefine_tests, one after the other.
- docs/ui-parity.md: kept both paragraphs.
Conflicts:
- crates/engine/src/cmd/text.rs: kept the kern_pair_tests module and added pick_up_format_tests after it.
- crates/tools/src/xform.rs: the one hit test keeps its spread (`hit` is the whole `cx.hit` result) and feeds both color.sample's matchFrom and type.pickUpFormat.
- ROADMAP.md: progress-log line moved under "Newest first."
crates/engine/src/cmd/object.rs: next's side with 069fe47b's auto-size guard, plus the PR's object.fit locked-objects note and the bottom-on-the-last-baseline fit; the reapplied fit_text_frame_tests module dropped, its baseline assertion added to next's copy.
crates/tools/src/select.rs, crates/tools/src/tests.rs: keep next's side.
crates/ui-egui/src/canvas.rs: drop the reapplied duplicate of the handle double-click test.
ROADMAP.md: next's line with the locked-objects note; no second copy.
main's file guard requires reads to pass the automation roots. Loading styles
from a path, the recent-files check and sniffing a dropped file without an
extension read with std::fs directly; they use the engine's io module.
The merge took main's 236 pt test frame (19 lines whatever the last line's
descent) with next's 7/3 expectations, which belong to next's 240 pt frame.
With main's frame the paragraph splits 6/4, as main's tests said.
main rolls a half-run script back (#709); next's #406 test expected the
successful prefix to stay as an undo step. Both keep a partial edit from being
stranded; the script keeps main's rollback, and the test checks that. The
generic partial-failure undo step stays covered by the fillWithPlaceholder test.
next converts InDesign files (#808); main's #21 check refused them by extension
before the converter ran. The check goes, and a converter error carries #21's
advice to export IDML.
The Find/Change dialog and main's find-scope tests send one parameter set
(with change, first, attrs) to Find, Find Next and Change. next's strict
parameter check refused those keys on find.find and find.next, so Find
failed in the dialog. The two commands now name the keys as ignored.