Commit Graph
6827 Commits
Author SHA1 Message Date
mtlcl410andClaude Opus 5.5 0481b98cda M12: an XFA template parsed directly is held to the packet size limit
parse() refuses a template larger than the 64 MiB a document's packets may
hold (read_packets' limit), before any of it is parsed, so what parsing
keeps of it, item lists held by the field and its properties among them,
stays within a few times that whoever calls it (review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-10-30 20:51:57 +08:00
KenM76andClaude Opus 5.5 f84290b294 perf(render): undo PNG predictors a byte row at a time (#5430)
The vendored hayro-syntax ran PNG predictors through the bit-level
BitChunks/BitWriter machinery TIFF predictors need, although PNG filters are
defined on bytes (ISO 32000-2 §7.4.4.4, PNG specification §9). A 993 x 936
RGB image took about 63 ms to unfilter whatever its row filters; undone on
byte slices it takes about 3 ms (Up) to 16 ms (Paeth) in a release build.

It also fixes a row that ends part-way through a pixel (three 4-bit samples
at an odd width): the bit-level path dropped its last byte, each later row
started a byte early and the picture came out sheared.

TIFF predictor 2 keeps the old path. Vendored hayro-syntax patch 29.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 08:23:56 -04:00
FredApps 673178b70c fix(edit): require intact streams when identifying page backdrops 2026-10-30 13:21:04 +01:00
mtlcl410andClaude Opus 5.5 89b0a5bec8 M12: an lr-tb XFA subform finds its children's SOM indices once, not per placed child
The subform's own sibling indices are reused for the first step of each
placed child, and a subformSet's are built once per set (review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-10-30 20:02:37 +08:00
FredApps 25f3d12960 style: format checked soft-wrap budget assignment 2026-10-30 12:54:56 +01:00
FredApps ee71348bc8 fix: bound soft-wrap metadata and preserve unknown backdrop content 2026-10-30 12:47:37 +01:00
FredApps 6d7f739e3c test: enforce page press routing and record integration regression evidence 2026-10-30 12:38:09 +01:00
mtlcl410andClaude Opus 5.5 a3382ca1f9 M12: an XFA subformSet's members flow among their lr-tb parent's other children
In a flowing (lr-tb/rl-tb) parent the members of a subformSet now go on
along the parent's line with its other children, rather than the set being
packed as one block that moves to the next line whole (XFA 3.3 p. 357: the
set is transparent to layout). The members keep the set in their SOM paths.
Adds a test that, in a table and in one of its rows, a set's members still
go one under another (review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-10-30 19:34:56 +08:00
FredApps bdf56209ce style: format combined paragraph regression 2026-10-30 11:08:55 +01:00
FredApps 7d3d4830e5 Integrate remaining six PdfCraft parity PRs with conflict resolutions
Includes #4325 #1952 #4180 #2529 #4320 #4805, preserving their original histories.
Keep paragraph alignment and hard/soft wrap metadata together; retain CCITT/downsampling/RGB ownership guards with bounded JBIG2 export and exact-copy symbol encoding.
Combined interaction regressions added. Validation pending.
2026-10-30 11:02:07 +01:00
FredApps a07f94f2f7 test: supply Fill & Sign colour in combined window-title fixture 2026-10-30 10:46:11 +01:00
FredApps b21af3b969 Integrate 21 clean-merging PdfCraft parity PRs
Preserve each original PR head and its authorship as a merge parent.
Includes #4304 #4335 #4384 #4404 #4179 #5300 #4719 #4541 #2815 #4620 #3789 #3779 #2960 #5208 #4596 #3636 #4494 #4013 #5134 #2133 #2635.
Conflicting candidates skipped. Combined CI pending; see docs/integration-20261030.md.
2026-10-30 10:35:42 +01:00
FredApps 4b319bb383 Keep typed font sizes accessible and within the current panel layout
Use a named compact preset arrow beside the field, retain the row alignment/width assertions for the editable control, and open the current colour flyout in the saved-text regression. No accessibility or layout checks are disabled.
2026-10-30 09:29:42 +01:00
FredApps e19f964690 Handle the current fallible FDF export API in the round-trip regression 2026-10-30 09:10:25 +01:00
FredApps 7227eb68ab Name the Pages sidebar keyboard group and record its accessible snapshot 2026-10-30 09:10:05 +01:00
FredApps ee82cf1a72 Remove extra blank lines after relocating font-size controls 2026-10-30 08:58:13 +01:00
FredApps b07a012cd7 Reconcile button export values with current form authoring modules
Preserve caption editing and current form/Prepare module boundaries. Carry export-only appearance preservation, validation and data round-trip tests to their current paths, and retain current attribution metadata. Hosted CI must validate this refreshed head.
2026-10-30 08:56:21 +01:00
FredApps ea66a642fe Reconcile Pages sidebar selection with current keyboard and panel modules
Preserve main's continuous text selection, page tools and module split. Carry only this branch's sidebar-focus feature and regression onto main, without resurrecting old common files from criss-cross merge bases. Hosted CI remains required.
2026-10-30 08:52:06 +01:00
FredApps 6b38a5ab47 Reconcile typed font sizes and Fill & Sign colours with current UI
Use the unified Format Text panel and current page-input context instead of restoring old monolithic UI code. Preserve main's pointer routing, editor accessibility and preferences; retain colour, save and input regressions. Hosted CI must validate this refreshed head.
2026-10-30 08:47:42 +01:00
KenM76andClaude Opus 5.5 ffa08fa00d fix(edit): reach one line above the paragraph's top (#3973)
A larger range on the first line of a multi-line paragraph rises from the
first line's baseline, not from the old box's bottom, so the reach now
extends one pitch above the moved box's top. Name the 1.2 em line floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 03:37:21 -04:00
KenM76andClaude Opus 5.5 8e5f423d6d fix(edit): reach as high as a larger range's glyphs
With only a range enlarged, row_step is the source leading, so the
styled rewrite's reach rose one source line above its old box while a
120-point range draws far higher, and an image there was missed. The
pitch is now at least 1.2 times the largest size.

The landing test gains a 120-point range on a 12-point OCR line under an
image above the old box; it fails without the floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 03:31:03 -04:00
mtlcl410andClaude Opus 5.5 07cab37e7b M2: test that a trailing open single-point subpath leaves the line before it alone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-10-30 15:07:21 +08:00
mtlcl410andClaude Opus 5.5 e5051ca139 M2: degenerate subpaths, all-zero dash arrays and negative line widths stroke as ISO 32000-2 8.5.3.2 / 8.4.3 say
Vendored hayro-interpret patch 61.

- A degenerate subpath (a single-point closed path, or points that all
  coincide) is stroked as a dot of the line width with round caps and not
  at all with butt or projecting square caps (8.5.3.2). The zero-length
  `l` is no longer nudged a ten-thousandth of a point (which gave square
  caps a direction to draw a square in), and `x y m h` keeps its `h`
  (kurbo's `is_empty` counts only segments, so it was dropped and the
  subpath painted nothing). Other subpaths and zero-length dashes are
  untouched.
- A dash array that is all zero, or has a negative or non-finite entry,
  is kept as `[]`, a solid line (8.4.3.6). `[0 0]` used to become
  `[0.01 0.01]`, a faint half-covered line.
- A negative or non-finite line width from `w` or `/LW` is kept as 0,
  the thinnest line (8.4.3.2), so no device sees a width below zero. The
  renderer already drew it as a one-pixel line in the stroke colour.

Tests: crates/render/tests/it/stroke_geometry.rs (pixel checks and a
recording device).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 15:07:21 +08:00
mtlcl410andClaude Opus 5.5 1f11ac9bbe M2: an inline image naming a device space ignores a malformed Indexed resource of that name (ISO 32000-2 8.6.8)
The inline-image check of patch (60) looked the /CS name up in the
ColorSpace resources even when it was a device space name or its inline
abbreviation (/RGB, /DeviceRGB, /G, /CMYK, ...). Those names never refer
to resources (ISO 32000-2 8.6.8), and ImageXObject::new takes the device
space first, so a malformed Indexed resource that happened to share the
name skipped an image that would draw correctly. Device names are now
excluded before the resource lookup.

Test: indexed_lookup::an_inline_device_space_name_ignores_a_resource_of_the_same_name
(fails with the filter removed: the image is skipped and drawn white).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 15:04:25 +08:00
mtlcl410andClaude Opus 5.5 7734556137 M2: an Indexed image whose lookup table is too short is skipped with a warning, not drawn black (ISO 32000-2 8.6.6.3)
An image in [/Indexed /DeviceRGB 7 <FF0000 00FF00>] was drawn entirely
black, indices 0 and 1 included. The interpreter rejected the colour
space when the table ran out, and the image fell back to DeviceGray, so
its index values were painted as near-black grey levels.

ISO 32000-2 8.6.6.3 says hival "shall be an integer", no greater than
255, and the table "shall be m x (hival + 1) bytes long". An image whose
Indexed space breaks this (hival not an integer in 0..=255, or a lookup
missing or shorter than needed) is now not drawn, and the render reports
RenderWarning::MalformedIndexedImage once per page; pdfcraft-cli render
prints it. A longer table is still fine. Inline images, including one
naming such a space as a resource, are skipped the same way. Fill and
stroke colours in such a space go through a different path and are
unchanged.

Vendored hayro-interpret patch (60), recorded in vendor/README.md.
Tests: crates/render/tests/it/indexed_lookup.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 15:04:25 +08:00
KenM76andClaude Opus 5.5 8fd151ff79 fix(edit): reach the styled rewrite's rows at the step they are written
The styled path writes rows `line_spacing` (1.5 by default) times the
size apart when a size or spacing is set, but its Reach assumed 1.2, so
an image over only the lower rows of a larger rewrite was missed. The
pitch now comes from the row writer's own step (row_step, shared by
both), at the largest size among the paragraph's lines and ranges.

The landing test gains a six-row rewrite at twice the size over an image
covering only its last row; it fails with the 1.2 step.
A case with only line_spacing set covers the other branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 02:53:45 -04:00
Dylan M. Taylor 1d1cbc4ec9 UPD.1: honor app pretend versions in update checks (#5397) 2026-10-30 02:35:18 -04:00
mtlcl410andClaude Opus 5.5 bea66e6081 M12: XFAImages: the name tree is walked borrowing each node, not copying its Kids
The walk queued every entry of a Kids array before checking the node
limit, and resolving a direct node or array deep-copied it (two to four
times for a direct tree). It now recurses (depth stays capped at 32),
borrowing each node from its resolved owner, and stops at the limit as
it goes: only the branch being walked is held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-10-30 14:29:39 +08:00
mtlcl410andClaude Opus 5.5 b8436dce5a M2: Symbol and ZapfDingbats stand-ins keep their standard advances (tests)
The stand-in fitting of hayro-interpret patch (67) also applies to Symbol
and ZapfDingbats (ISO 32000-2 9.6.2.2, Annex D.5 and D.6). Tests show
that their glyphs, and the check mark a check box draws for its /MK /CA
caption 4, keep the standard advance:

- symbol_dingbats_width (pdfcraft-render tests/it): Symbol alpha, beta,
  pi, Sigma, Omega, Delta, infinity, bullet and plus, and ZapfDingbats
  a20, a19, a23, a24, a71, a73, a77 and a28, drawn with no /Encoding:
  each glyph's ink lies within its standard advance and fills most of
  it, and the next glyph starts one standard advance on.
- dingbat_check_box (pdfcraft-engine tests/it): a check box with no /AP,
  /DA (/ZaDb 60 Tf 0 g) and /MK /CA (4) draws its check centred in the
  box, within its 846-unit advance and not squeezed.

The patch is renumbered (67), next after main's highest (66), and the
Tests column lists the new tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 14:20:38 +08:00
mtlcl410andClaude Opus 5.5 74c0880822 M2: the standard 14 fonts fit the Euro to its standard width (WinAnsi 128)
A standard 14 font named without /Widths is drawn with a bundled CFF
stand-in. Its glyphs are fitted to the standard metrics only when the
stand-in's own advance is known, and for the CFF stand-ins it never was,
so each glyph was drawn at its own width. The stand-ins' Euro is 667 to
722 units wide against the metrics' 556 (Helvetica) and 500 (Times), and
it overlapped the glyph after it ("€5", "€€", "a€b"). The advances
themselves were right: both the renderer's metrics and the writer's
Std14 table already give the Euro 556/500/600.

hayro-interpret patch (67): CffFontBlob::advance_width reads a glyph's
advance from its charstring, and StandardFontBlob uses it, so a stand-in
glyph is fitted to the standard width as the OpenType stand-ins already
were (ISO 32000-2 §9.6.2.2; Annex D Table D.2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 14:20:21 +08:00
KenM76andClaude Opus 5.5 705d862328 fix(edit): check revealed OCR text where the rewrite lands
The on-top trigger compared later paint with the paragraph's old box. A
rewrite that is moved (BlockStyle::offset), rewrapped wider or grown to
more lines can land under an image the old box is clear of, and stayed
underneath it. Both rewrite paths now test a Reach: the old box (where
the cover goes) plus the moved box grown to the wrap width either way
and down to the drawn line count (the widest measured line when wider), and
up by one line pitch for a larger size; turned text grows by the lines'
diagonal; any non-finite number makes it unbounded. Over-reaching is
harmless: the cover still fills only the old box. The parity notes say
so.

Tests: an_ocr_rewrite_goes_on_top_of_paint_over_where_it_lands (move,
width and line growth, both paths) and a_rewrites_reach_covers_its_move_
width_and_lines. Seen failing with each path reverted to the old box and
with growth zeroed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 02:12:01 -04:00
mtlcl410andClaude Opus 5.5 68cad98ab4 M2: zero-area fills and clips: exact zero only, snap only within one row or column
`degenerate_fill_area` took a side under 1/256 unit as zero, so a thin
rectangle with area that the CTM scales up to whole pixels (100 x 1/1024
under a 4096x vertical scale covers four device rows) was clipped and
filled as a one-pixel band along its bounding-box diagonal. The fill
fallback had the same threshold and stroked it as a hairline. Both now
treat only an exactly zero side as degenerate; a box with area is
filled and clipped as the shape it is.

A slanted zero-height line less than a pixel high was snapped to its
whole bounding box, marking both rows along its full length when it
crossed a row boundary. Whole-pixel snapping is now used only when the
line stays within one device row or column (a line under 1/256 pixel
across is taken at its middle); otherwise it is the one-pixel band, so
each row is marked only where the line runs through it (ISO 32000-2
§10.7.4, half-open pixel squares the shape intersects).

Tests: crates/render/tests/it/zero_area_fill_clip.rs
a_thin_rectangle_scaled_up_to_whole_pixels_keeps_its_area and
a_slanted_zero_height_line_crossing_a_row_marks_each_row_only_where_it_runs
each fail with their part of the fix reverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 14:11:52 +08:00
mtlcl410andClaude Opus 5.5 7bcd89c816 M2: zero-area fills and clips mark the pixels they touch (ISO 32000-2 scan conversion)
A rectangle with no height or no width encloses no area, so the
rasteriser marked nothing for it. As a clip (`10 10 100 0 re W n`) it
hid everything painted after it; as a fill it fell back to a
thinnest-line stroke that half-covered two rows when the line lay on a
pixel boundary.

ISO 32000-2 §10.7.4 paints every pixel whose half-open square the shape
intersects, "no matter how small the intersection is" ("A zero-width or
zero-height rectangle paints a line 1 pixel wide"), and a clipping
region is "the set of pixels that would be included by a fill
operation".

hayro-interpret patch (65), `degenerate_fill_area`: a fill or clip whose
path has no width or no height (but not both) gets the device pixels the
line touches - whole pixels when it runs along a device axis, a band one
device pixel wide when a rotated CTM turns it. Points, and paths with
area however thin, paint as before.

Tests: crates/render/tests/it/zero_area_fill_clip.rs (5 of 8 fail with
the patch reverted; 9 mutants of the patch each fail a test).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 14:11:31 +08:00
mtlcl410andClaude Opus 5.5 aed4599ed1 M8: the unread-form metadata test nests past main's form depth limit (#2448)
main raised the redaction pass's form depth limit from 12 to 50 (#3645),
so the 16-deep chain was walked and the test's form was no longer removed
unread. The chain is now built from MAX_DEPTH, one level past it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 13:58:50 +08:00
mtlcl410andClaude Opus 5.5 5b2048ef25 M5: a removed glyph whose text isn't known makes the metadata check fail closed (#2448)
Review on #2539: a removed glyph with no known text (no /ToUnicode, a
glyph name outside the list) went in as an empty string and nothing marked
the collection as incomplete, so when every removed glyph was like that
the terms were empty and /Info and XMP were left untouched. It now counts
as text the check couldn't keep, and every /Info string and XMP stream goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:58:50 +08:00
mtlcl410andClaude Opus 5.5 d64a363f46 M8: metadata search decodes character references with any number of leading zeros (#2448)
Review follow-up: `&#00000000000066;LUEFIN` hid BLUEFIN from the 13-byte scan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:58:50 +08:00
mtlcl410andClaude Opus 5.5 56ce7661d6 M8: one search budget per metadata scrub, bounded entity scan, fail closed for unread forms (#2448)
Review by Losminek on #2539:
- The work cap was checked per value, so very many small /Info or XMP
  values could add up without bound. One budget now covers the whole
  scrub; past it every further entry or packet counts as matching
  (fail-closed). Identical removed runs are searched once.
- unescape looked for ';' through the rest of the text before checking
  the 12-byte entity limit, so a packet of bare '&'s was quadratic. It
  now looks only at the next 13 characters (200,000 '&': 943 ms -> 5 ms).
- A form XObject removed whole past the depth limit, or when its stream
  doesn't decode, never had its text read; both paths now set
  removed_cut so the metadata check clears everything instead of
  searching incomplete text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:58:49 +08:00
mtlcl410andClaude Opus 5.5 ca0cc61b2d M8: exact xpacket target, spaced xmlns declarations, XMP decoded within its cap (#2448)
Review follow-up on #2539:
- only a processing instruction whose target is exactly `xpacket` is
  skipped, so `<?xpacketAudit …?>` is searched like any other;
- an attribute name is kept across whitespace before `=`, so
  `xmlns:x = "adobe:ns:meta/"` is still a declaration, not a value;
- the XMP stream is decoded with decoded_within(MAX_XMP_BYTES), so a small
  stream that inflates hugely stops at the cap instead of after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:58:49 +08:00
mtlcl410andClaude Opus 5.5 c405d280c6 M8: metadata check fails closed and finds letter-spaced and short XMP values (#2448)
Review follow-up on #2539:
- the glyph end includes character and word spacing, so letter-spaced
  redacted text is one word and still matches /Title (Bluefin);
- an XMP value wholly part of a removed run goes, as an /Info value does
  (J. Li), compared as whole words (True stays with "untrue");
- when the removed text was cut short (too many runs, a run too long, too
  many terms) every /Info string and XMP stream goes instead of searching
  what was kept;
- XMP that is not valid UTF-8 or UTF-16 (also UTF-16 without a leading
  mark) is not searched lossily but removed;
- namespace declarations and the xpacket wrapper are not searched;
  comments and other processing instructions are;
- the raw-byte assertion saves without object streams so it can see /Info.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:58:49 +08:00
mtlcl410andClaude Opus 5.5 459cf4af5d M8: test that a shorter value goes from custom XMP too (#2448)
A value shorter than the redacted sentence ("James Bond" from "JAMES BOND
IS A SPY") in a custom schema's element or attribute takes its packet
with it, as it goes from /Info, while a clean packet and an unrelated
entry stay. The regression #2598 suggested keeping whichever fix lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:58:41 +08:00
mtlcl410andClaude Opus 5.5 cf2207cbea M8: an Info value that is part of the redacted text goes too (#2448)
An /Info value whose words are too short to be terms ("J. Li") survived
when the sentence holding it was redacted. A value that is wholly part
of a removed run, with three letters or digits at least, now goes as
well (the reverse check #2598 proposed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:58:41 +08:00
mtlcl410andClaude Opus 5.5 fd653e46ac M8: redaction removes Info entries and XMP that repeat the redacted text (#2448)
Applying redactions removed the glyphs under the marks but left the same
words in the document information dictionary and the XMP metadata.

The redaction interpreter now collects the removed glyphs' text in runs by
position. After verification, /Info entries containing a run (or one of its
longer words) are removed, and the catalog's and pages' XMP streams whose
text mentions one are removed whole; unreadable or oversized XMP fails
closed. Report::metadata counts what went.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:58:40 +08:00
Dylan M. Taylor 3517d05b47 Update prompt shows the app icon and accent color instead of a letter (#5388)
UPDATE_APP (native builds; craft-update is a native-only dependency) carries our 128 px icon and accent (#b70228, its red, from the icon (#5245)). The updater, the self-update
helper and craft-update's startup prompt all get them through crate::UPDATE_APP; the
prompt draws the icon, the accent and "by ArtCraft" (craft-update's default developer).

craft-update is pinned to storytold/craft-libs main at 1065653e7 (#434).
Clippy fixes for Rust 1.99 in untouched code (same logic):
- crates/edit/src/images.rs
- crates/forms/src/appearance.rs
2026-10-30 01:27:58 -04:00
mtlcl410andClaude Opus 5.5 88dfcbdd18 M3: Find keeps same-glyph hits on pages with a divided word
On a page with a word divided by a line-end hyphen, Find searches three
readings and merged their hits by dropping any hit that overlapped the
one kept before it. That also dropped hits of one reading that share a
glyph, such as "f" twice in an "ffi" ligature glyph, so the match count
depended on unrelated text elsewhere on the page. A hit is now left out
only where it overlaps one kept from another reading. The test oracle
follows the same rule, and a fixed case covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 13:25:58 +08:00
mtlcl410andClaude Opus 5.5 f2674580ec M3: Find matches ligatures and words split by a line-end hyphen
Find, text_find and Search & Redact's word search read the Latin
compatibility ligatures U+FB00-U+FB06 as their letters, in the page and in
the query, so "office" finds a page drawn with an fi ligature glyph
(ISO 32000-2 9.10.3 maps ligature glyphs to their letters). Each letter
stays owned by its glyph, so the highlight covers the ligature.

Where a line ends in a hyphen (U+002D, U+00AD, U+2010) between two
letters, the page is also searched with the hyphen and the break dropped
("example" finds "exam-" + "ple") and with the hyphen kept but the break
dropped ("exam-ple"). The hits are merged in page order; a match covers
both lines and is highlighted on each. Pages without such a hyphen are
searched once, as before.

Accent-insensitive search is left to the open pull request for #3460.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 13:25:40 +08:00
KenM76andClaude Opus 5.5 3c11186dbd fix(edit): move revealed OCR text on top only when an XObject covers it
An unrelated image later on the page no longer moves the paragraph and
its cover on top, where the cover could hide visible content inside the
paragraph's box. An XObject now counts only when it is drawn at or after
the paragraph and its visible box overlaps the paragraph's
(`images::painted_over`, from `page_images`). An inline image or a
shading after the paragraph still counts anywhere, and so does any XObject
when the page's images cannot be listed.

The trigger table now covers an image elsewhere, an image drawn first,
visible text, a filled path, a shading and an inline image. It fails with
the old any-`Do` trigger.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 01:22:41 -04:00
mtlcl410andClaude Opus 5.5 b1c68aa028 M12: XFAImages: pictures kept for reuse count against the total too
A picture read from the file is kept for the next place that links it.
Those kept bytes now count against MAX_TOTAL as well: past it, a name
not read yet is neither read nor kept, so a tree with many names holds
no more than the total however many names it has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-10-30 12:50:18 +08:00
KenM76andClaude Opus 5.5 5a2f9273a3 test(edit): pin when revealed OCR text moves on top
A table test for `revealed_under_paint`: only invisible text with an
XObject, inline image or shading after its place moves; a filled path,
visible text or nothing after it does not. Seen to fail with the check
reduced to `invisible`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 00:46:27 -04:00
mtlcl410andClaude Opus 5.5 6d36eacb94 M12: an XFA table cell's content is measured at the column's width
A flowed subform in a row cell is drawn at its column's width; its
content height is now measured at that width (less the cell's margins)
rather than at the width the cell gives itself, so content that wraps
in a narrower column no longer runs under the next row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-10-30 12:45:32 +08:00
KenM76andClaude Opus 5.5 270a11e699 fix(edit): refuse before changing anything; cover undo, reopen, re-edit and the split case
An OCR paragraph that may go on top of the page is checked (`check_on_top`)
before either rewrite path changes the document, so a page whose marked
content nests too deep is refused with nothing changed. `lift_on_top` no
longer checks.

Tests: undo restores the hidden layer and the scan, redo, save and reopen,
and a second edit of the moved text all show the edit; a phrase split from
visible text in the same text object shows its edit; a refused rewrite on a
too-deep page leaves the saved bytes unchanged. Each new test was seen to
fail with its part of the fix reverted.

Parity: the note says when the edit is drawn on top and lists what is
still missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 00:43:25 -04:00