Found while testing crates/textimport/src/docx.rs:354
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
#563 composed the story again with its objects where the previous pass put them, up to four
times. In a long story whose objects move between frames from one pass to the next (Learn Skills
Daily's 03_HP_LongDoc_Class, 79 pages), that never settled: stale wrap areas pushed headings into
the next frame. Now the composer places a custom or above-line object when its anchor line is set
and the lines after it wrap it in the same pass, as in InDesign.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The EPSF binary header is 22 bytes (magic, psStart, psLength, tiffStart,
tiffLength, checksum), so the TIFF section is at 12/16 — not at 20/24,
which is the checksum plus the first two bytes of the PostScript section
and always lands past the end of a real file. A legacy DOS EPS therefore
never showed its preview: it fell back to drawn rectangles or the grey
placeholder. The old fixture encoded the same wrong layout, so it could
not catch it.
Read tiffStart/tiffLength at 12/16, document the header, and rebuild the
fixture on the real layout. Regression: the fixture test fails on main
(pixel_size 201x101 — the stand-in) and passes with the fix (10x5 — the
preview).
ST_OnOff (ECMA-376 17.17.4) is a boolean plus the words on and off, but
the toggle reader only counted 0/false/none as off — so <w:b w:val="off"/>
(a legal spelling written by non-Word producers) imported as bold, and
the same for <w:i>, <w:strike>, <w:caps>, <w:isLgl> and <w:u>.
Add "off" to both off-lists. Regression test:
off_valued_toggles_stay_off — on main the off run imports bold; with the
patch it stays regular and an on run stays bold.
Composite-font and mojikumi metrics were taken from the file with no
sanity check, and Document::check rejects a zero, NaN or infinite
relative_size / horizontal_scale / vertical_scale / baseline_shift — so
one attribute anywhere in the package (RelativeSize="0",
BaselineShift="NaN") failed the import with "invalid composite font
metrics" and left the file unopenable. Every neighbouring number in this
importer already filters; the metrics now do too and fall back to a
usable value.
Regression test: unusable_cjk_metrics_do_not_refuse_the_whole_file —
fails on main with Invalid("invalid composite font metrics: Rubies"),
passes with the fallback.
The "N errors ▾" text in the status bar was a plain label. As in
InDesign it is now a menu; its Preflight Panel… entry shows the panel
(`window.panel {panel: "preflight"}`).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 533ba782643314e5841fb8bb58cd3af4bf2dd9ae)
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)
With frame edges shown, every text frame that ends an overset story
carries the red mark at its out port, selected or not and inside
groups too. InDesign marks only the selected frame, so an overflowing
label inside a grouped object stayed invisible until Preflight.
Hidden frames and hidden layers are skipped; the group walk is bounded.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit d9ef96dd4b8189b423b4fc32bbb4bf6e3c5c6727)
(cherry picked from commit b60500660ba1dd02bd5c09dd35e0e3238b6ae21b)
A selected group drew no in/out ports for the text frames in it, so an
overset frame inside a group had no red mark. The selection walks groups
(bounded depth) and draws each nested text frame's ports with the group's
transform.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 17a3cf9bd1c695a585e94fce125ed9d3a3a5929d)