Commit Graph
4320 Commits
Author SHA1 Message Date
KenM76andClaude Opus 5.5 ad33ab626e fix(render): a non-isolated knockout group blends its elements with the page under it
A non-isolated knockout group starts from the backdrop under it (ISO 32000-2
§11.4.7, §11.4.8), but was drawn into a layer of its own starting transparent,
so a blend mode inside it had nothing to blend with: white with /BM /Difference
over magenta stayed white (#4886).

Entered plainly (full opacity, no soft mask, Normal, not itself a knockout
element), the group is now drawn once per blend mode its elements use. Each pass
is a knockout layer composited onto the backdrop in that mode; elements of other
modes clear what is under their shape instead of painting. The Normal pass finds
the other modes, so a group without blend modes takes one pass as before.

hayro-interpret patch 67 (Device::begin_knockout_pass / end_knockout_pass,
draw_knockout_passes), hayro patch 26 (the renderer side). Test:
pdfcraft-render it::knockout_backdrop, three cases failing with the fix
reverted, plus an isolated-group control.

Fixes #4886

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-26 20:18:32 -04:00
KenM76andClaude Opus 5.5 0457aa88f9 fix(redact): Q inside a text object restores the text matrices; revert the render change
Review on #4831 pointed out the PDF Association's erratum to ISO 32000-2
(pdf-association/pdf-issues #368): inside a text object, q/Q also save and
restore Tm and Tlm (§9.4.1, referenced from §8.4.2). Acrobat 26.2 agrees on
a synthetic PDF 2.0 page. The renderer on main already did this, so the
previous commit's hayro-interpret patch (67) was wrong: it is reverted here,
with its vendor/README row and the render tests.

The real disagreement was in the redactor's own interpreter, which kept Tm
and Tlm across Q. Find took its boxes from the renderer's text, the redactor
measured the glyphs elsewhere, and redact_apply refused on residue. Its
state stack now holds (Gs, Tm, Tlm) and Q restores all three.

Test: it::redact_text_after_q, end to end on %PDF-2.0 fixtures, three cases
(font change inside q/Q; q 100 0 Td Q; the same followed by T*). With the
redactor change reverted, each case fails on its own at redact_apply. With
only Tm restored, the T* case fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-26 19:51:58 -04:00
skylar taylor-barrick 9a9813bf7d Merge pull request #4880 from storytold/fix/nextest-0.9.150
ci: require nextest 0.9.150
2026-10-26 17:39:25 -06:00
KenM76andClaude Opus 5.5 0e559fca41 fix(ui-egui): the field editor sizes auto-size text as the page does
Review on #4862 found two mismatches between the on-page field editor and
the field's appearance:

- Comb fields: the editor sized them as single-line text (20.87 pt for a
  500 x 30 comb) while the appearance uses 4-12 pt from the cell height.
  The comb test is now `Field::is_comb` and the comb size
  `appearance::comb_auto_text_size`, both shared by the appearance and
  `forms_ui::field_text_size`. The editor's test was looser (it ignored
  Multiline and Password); it now matches the page's.
- Tall fields: `field_text_size` capped at 300 pt and the three call sites
  clamped the screen font to 64. Both are gone; `field_screen_font` scales
  by zoom and bounds the result at MAX_SCREEN_FONT (256 screen points) so a
  glyph stays well inside the font atlas.

A non-finite comb height now gives 4 pt, as single-line auto-size does.

Test: it::forms::the_field_editor_sizes_auto_size_text_as_the_page_does.
With the comb change reverted the comb assertion fails (20.87 vs 12); with
the 300/64 caps restored the 100 pt assertion fails.

Also fixes it::forms::dragging_over_another_fields_text_focuses_it_and_selects_from_the_press,
which the previous commit broke: the name field now auto-sizes to 13.9 pt
instead of 12, so the press point 30 px in fell on "A|da"; it is now 38 px
in, inside "Ad|a" as the test intends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-26 19:27:44 -04:00
aiongg d15c5a2e21 refactor(ui-egui): move file_watch.rs into platform/ 2026-10-26 22:46:12 +00:00
aiongg 3e7cc6e5cb refactor(ui-egui): move drag_pointer.rs into platform/ 2026-10-26 22:46:12 +00:00
aiongg 73cd1b16db refactor(ui-egui): move icons.rs into widgets/ 2026-10-26 22:46:12 +00:00
aiongg 228a91c19a refactor(ui-egui): move icon_data.rs into widgets/ 2026-10-26 22:46:12 +00:00
aiongg 963b25f59b refactor(ui-egui): move side_panels.rs into panels/ 2026-10-26 22:46:12 +00:00
aiongg 9c27b333f5 refactor(ui-egui): move search_ui.rs into panels/ 2026-10-26 22:46:12 +00:00
aiongg dc6b6a5c4e refactor(ui-egui): move page_selection_ui.rs into panels/ 2026-10-26 22:46:12 +00:00
aiongg 946767d22d refactor(ui-egui): move organize_panel.rs into panels/ 2026-10-26 22:46:12 +00:00
aiongg 9771123c72 refactor(ui-egui): move format_text_ui.rs into panels/ 2026-10-26 22:46:12 +00:00
aiongg 604ad52c7d refactor(ui-egui): move comments_panel.rs into panels/ 2026-10-26 22:46:12 +00:00
aiongg 81e489b23f refactor(ui-egui): move all_tools_ui.rs into panels/ 2026-10-26 22:46:12 +00:00
aiongg 900d56c411 refactor(ui-egui): move word_count_ui.rs into dialogs/ 2026-10-26 22:46:12 +00:00
aiongg 1096b2a6b7 refactor(ui-egui): move standards_ui.rs into dialogs/ 2026-10-26 22:46:12 +00:00
aiongg de0e370792 refactor(ui-egui): move protect.rs into dialogs/ 2026-10-26 22:46:12 +00:00
aiongg e080461257 refactor(ui-egui): move palette.rs into dialogs/ 2026-10-26 22:46:12 +00:00
aiongg 7f0799c8bd refactor(ui-egui): move pageboxes.rs into dialogs/ 2026-10-26 22:46:12 +00:00
aiongg e901fb838b refactor(ui-egui): move marks_ui.rs into dialogs/ 2026-10-26 22:46:12 +00:00
aiongg f877aaf1c4 refactor(ui-egui): move credits.rs into dialogs/ 2026-10-26 22:46:12 +00:00
aiongg 385e24ec2f refactor(ui-egui): move comment_props.rs into dialogs/ 2026-10-26 22:46:12 +00:00
aiongg 40bb91b402 refactor(ui-egui): move appearance.rs into dialogs/ 2026-10-26 22:46:12 +00:00
aiongg c5d498227d refactor(ui-egui): move web_print.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg 9254db5e88 refactor(ui-egui): move print_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg 37578f2bb3 refactor(ui-egui): move optimize_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg c1024e07ed refactor(ui-egui): move ocr_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg 94a71dbcea refactor(ui-egui): move js_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg beb8b9c465 refactor(ui-egui): move files.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg ce982224f3 refactor(ui-egui): move export_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg a1babcd278 refactor(ui-egui): move create_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg c0740b6ac8 refactor(ui-egui): move create_multiple_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg 5c36be94d2 refactor(ui-egui): move compare_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg 6607eb5dd9 refactor(ui-egui): move combine_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg 46010b61ae refactor(ui-egui): move combine_grid.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg e23e460c33 refactor(ui-egui): move actions_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg 6e85f0d8cc refactor(ui-egui): move a11y_ui.rs into workflows/ 2026-10-26 22:46:12 +00:00
aiongg fc4a75d274 refactor(ui-egui): move tags_ui.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg e74c807ee6 refactor(ui-egui): move stamps_ui.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg d055e7e090 refactor(ui-egui): move sign_ui.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg 5d66a1ad63 refactor(ui-egui): move redact_ui.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg 67c203837b refactor(ui-egui): move prepare.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg c8ef7f66b3 refactor(ui-egui): move object_ui.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg 3448ddfc30 refactor(ui-egui): move measure_ui.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg f8ee929066 refactor(ui-egui): move link_ui.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg e012ef807e refactor(ui-egui): move forms_ui.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg 2f8712b009 refactor(ui-egui): move fill_sign.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg 10b689f931 refactor(ui-egui): move field_table_ui.rs into tools/ 2026-10-26 22:46:12 +00:00
aiongg f35adcdf99 refactor(ui-egui): move edit_text_ui.rs into tools/ 2026-10-26 22:46:12 +00:00