Commit Graph
2863 Commits
Author SHA1 Message Date
KnottyDyesandClaude Opus 5.5 a84faee829 PDF: a hidden layer missing from the placed file aborts vector export
Main now aborts an export when a stored hidden layer can no longer be
applied (#876). Vector export follows it: a layer hidden in Object Layer
Options that the placed PDF doesn't have, because the file has no layers
or was relinked, fails with an error naming the file instead of exporting
everything visible. The image-path tests for oversized images and
undecodable content export as PDF/A-2b, which still rasterizes placed
PDFs with hidden layers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 01:54:58 -06:00
KnottyDyes 38d692089f PDF: preserve placed optional-content visibility in vector exports
Keep source defaults and per-frame hidden layers in plain and PDF/X-4 vector exports, including independent repeated placements, booklet output and book merging. Accept usage-application arrays and resource-only groups without a catalog configuration.

Use file-named warnings and all-ON defaults for recoverable default-configuration problems and unsupported base states. Add readable groups omitted from OCGs without discarding their visibility, combine concurrent recovery warnings, and generate missing names only when no frame override needs name matching. Retain errors for contradictory states, unresolved references and ambiguous name overrides.

Cache prepared variants per asset and hidden-name set while replaying recovery warnings through the existing deduplicating channel. Keep original source bytes when every group is visible and named, so reader-repaired cross-reference tables remain usable without an incremental layer update. When hidden groups or generated names require writing, reject an unusable cross-reference table with a file-named damage error and retain the first placement failure.

Cover visibility, recovery, names, independent placements, repaired cross-reference tables and vector output with 46 optional-content integration tests, plus preparation-cache and shared-buffer unit tests.
2026-10-24 01:54:58 -06:00
Dylan M. TaylorandDylan Taylor f90d286721 chore: resolve SonarCloud maintainability issues (#1698)
* chore: resolve SonarCloud maintainability issues

- Replace lambda closures with method references (S1612)
- Replace wildcard imports with explicit imports (S2208)
- Refactor complex functions with extracted helpers (S3776)
- Replace OR pattern with range pattern in math parser (S9047)

* style: apply rustfmt to warichu helper

* fix(compose): revert slice conversion in tests and remove unused var in warichu

* Group warichu row layout scalars to satisfy S107 parameter limit

* style: satisfy rustfmt in warichu.rs

---------

Co-authored-by: Dylan Taylor <dylan@craftmaker.dev>
2026-10-24 03:54:24 -04:00
skylar taylor-barrick 5449bc4757 M6: preserve PDF catalogs and safely apply layer choices (#1670)
Preserve existing PDF catalog entries and full object generations. Accept literal null trailer entries while failing closed on encrypted/hybrid/ambiguous or unreadable history. Validate visibility variants atomically before document edits, suppress stale unsupported canvas overrides, and preserve conservative content cropping without overcropping empty optional-content stubs.

Local full CI: all 9 gates passed, 3063 tests passed and 6 skipped, all 16 WASM-safe crates checked. Independent qpdf/preservation/Poppler checks passed for17 supported inputs;6 refusal cases stayed refused. All11 additional Prev controls passed. GitHub CI and CodeRabbit passed on00d5fa5c; CodeRabbit confirmed the Prev finding addressed. Author history preserved; no native format changes.
2026-10-24 00:51:57 -06:00
skylar taylor-barrick 00d5fa5cdd M6: reject unreadable PDF trailer history links (#1670)
Reject a non-null Prev entry that cannot be read as an offset instead of silently treating it as the end of the guarded trailer chain. Keep absent/null end markers and readable numeric offsets unchanged.

Reproduced CodeRabbit discussion_r4366245854 with an independent probe and a failing native regression before the fix. The synthetic regression covers seven unreadable value types plus absent/null and integer/real history controls.

Validation: all 9 cargo xtask ci gates passed (3063 tests passed, 6 skipped; 16 WASM-safe crates). One unrelated GPU test was labelled leaky by nextest in that run and passed cleanly in an isolated rerun. Independent checks: 17 original supported PDF variants still pass qpdf, logical preservation and Poppler pixels; 6 original refusal cases remain refused. All 11 additional Prev controls pass (7 refused, 4 accepted).
2026-10-24 00:40:33 -06:00
skylar taylor-barrick 7427a15863 M6: harden placed PDF layer variants (#1670)
Integrate current main (d8d78851) without rewriting the contributor's commits, retaining craft-libs 9f75d3dc.

Accept literal null trailer entries while rejecting actual or ambiguous encryption/hybrid markers. Structurally inspect bounded xref/trailer history instead of adopting trailer-looking comments. Preflight all selected source variants before editing/undo; preserve reset-to-defaults. Suppress stale unrewritable canvas overrides rather than revealing source content. Keep conservative all-content crop fallback without overcropping layerless/null stubs.

Validation: cargo xtask ci, all 9 gates passed; 3062 tests passed, 6 skipped; all 16 WASM-safe crates checked. 17 supported variants passed independent qpdf, logical preservation and Poppler pixel checks; 6 unsupported/repair-only cases refused. Direct-harness Claude Opus 5 reviewed the exact main-relative delta with no blocking findings.

No native-format changes or unrelated layer features. Synthetic regression fixtures are generated in test code.
2026-10-24 00:18:22 -06:00
aiongg d8d7885172 Anchored objects: Relative to Spine mirrors custom positions on right-hand pages (#1702)
* Anchored objects: Relative to Spine mirrors custom positions on right-hand pages

* Anchored objects: page side from the frame's spread position; footnote cache keyed by page side
2026-10-24 01:34:05 -04:00
aiongg 4823b59492 PDF: shared reader from craft-libs 9f75d3dc (input bounds and crash fixes) (#1701)
* PDF: craft-pdf, krilla and hayro from craft-libs main (input bounds and crash fixes)

* PDF: craft-libs 9f75d3dc, with hayro-cmap from its vendored copy
2026-10-23 23:03:36 -04:00
Dylan M. Taylor 203529ab36 ci: move release workflow write permission to job level (SonarCloud S8233) (#1697) 2026-10-23 22:03:59 -04:00
aiongg 3b71900097 Links: resolve stored paths with craft-docpath's resolve_absolute (#1399)
* Links: use resolve_absolute for stored paths

* Links: check for a missing linked file with is_ok_and

* CI: release only with git dependencies from storytold

The winit patch from skylartaylor/winit at its pinned rev is the one other source allowed.

* Links: Relink to Folder only uses a name that stays a file name in the folder

* CI: the git-sources check reads Cargo.lock as TOML, needs it current and refuses config patches

* CI: the git-sources check parses .cargo/config and .cargo/config.toml for source replacement, patches and paths

* Links: rustfmt

* Links: Relink to Folder only takes a file directly in the chosen folder

* Links: Relink to Folder compares folders as the file system resolves them
2026-10-23 21:19:50 -04:00
Davit MatchakhelidzeandClaude Opus 5.5 80d13911b2 fonts: Georgian UI text from craft-fonts' Noto Sans Georgian (#1270)
* fonts: Georgian UI text from craft-fonts' Noto Sans Georgian

font_definitions registers the Geor face and appends it to every family, like
Arabic (and to the Arabic families after the CJK faces); the wasm filter in
crates/fonts/build.rs keeps the face. The installed-font probe for Geor stays
skipped whenever craft-fonts covers the script. Bump craft-fonts-ref to a71c20e
(storytold/craft-fonts#27).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF

* Release: build the web version with craft-fonts too (web-craft-fonts)

The shared release workflow builds the web release without CRAFT_FONTS_DIR unless web-craft-fonts
is set, so the web version would still have no Georgian face (CodeRabbit on vectorcraft#2934).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF

* test: the Arabic New Document test scrolls to Height like the other fields

With craft-fonts' Noto Sans Arabic (from a71c20e3) the rows above Height are taller, so at
392x271 the field starts partly below the dialog body's clip and the test's unscrolled
visible_label check failed (FreeBSD jobs). It stays reachable: scroll to it as the test
already does for Gutter and the margins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF

* CI: same craft-fonts pin as release (a71c20e3), so the gate checks the Georgian face

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 19:47:45 -04:00
Brandon Thomas 348a8a4dc9 Merge pull request #1235 from KnottyDyes/squad/pdfx-unembedded-fonts
PDF: report visible unembedded fonts in PDF/X-4
2026-10-23 17:30:30 -04:00
Brandon Thomas 058b369b53 Merge storytold/main into squad/pdfx-unembedded-fonts
# Conflicts:
#	docs/gaps.md
#	docs/target-app-parity.md
2026-10-23 17:30:20 -04:00
Brandon Thomas 79c4ed5d3a Merge pull request #1308 from Silvertree2010/fix/h553-ase-export-corrupts-the-file-whe
Truncate ASE swatch names that overflow the u16 length field
2026-10-23 17:30:14 -04:00
Brandon Thomas 8ce126407e Merge pull request #1310 from Silvertree2010/fix/h572-docx-import-stores-out-of-range
Drop out-of-range font sizes on DOCX import
2026-10-23 17:30:10 -04:00
Brandon Thomas a77660b9fa Merge pull request #1319 from Silvertree2010/fix/h679-docx-xlsx-xml-parser-silently-dr
Keep CDATA text in the DOCX/XLSX XML parser
2026-10-23 17:30:07 -04:00
Brandon Thomas ce7d993f52 Merge pull request #1442 from HEOJUNFO/fix/grey-tiff-device-gray
Export placed greyscale TIFFs as DeviceGray
2026-10-23 17:30:03 -04:00
Brandon Thomas ae550aa670 Merge pull request #1470 from nikolainyegaard/language-picker-order
Preferences: list the languages alphabetically by their own name
2026-10-23 17:29:59 -04:00
Brandon Thomas 807d9b5723 Merge pull request #1491 from Hamza0101/fix/underline-under-tabs
An underline runs across a tab, as the rest of the line's text (#1466)
2026-10-23 17:29:54 -04:00
Brandon Thomas f682c80d7b Merge pull request #1547 from Silvertree2010/fix/h1246-idml-round-trip-renames-styles-w
Keep a literal ':' in style names through an IDML round trip
2026-10-23 17:29:50 -04:00
Brandon Thomas d45a7baf4c Merge storytold/main into fix/h1246-idml-round-trip-renames-styles-w
# Conflicts:
#	crates/idml/src/tests.rs
2026-10-23 17:29:40 -04:00
Brandon Thomas aaa18ad1c2 Merge pull request #1550 from Silvertree2010/fix/h1233-text-frame-column-count-is-trunc
Clamp text frame column count before narrowing to u32
2026-10-23 17:29:35 -04:00
Brandon Thomas 0d156f32b6 Merge pull request #1560 from Hamza0101/feat/cell-rotation-reported
Rotated cell text is settable and reported, not silently flattened (#1468)
2026-10-23 17:29:32 -04:00
Brandon Thomas 8eb4f5590a Merge storytold/main into feat/cell-rotation-reported
# Conflicts:
#	crates/idml/src/tests.rs
2026-10-23 17:29:22 -04:00
Brandon Thomas b212bdcd8f Merge pull request #1561 from Hamza0101/fix/rtl-first-line-indent
A right-to-left paragraph's first-line indent is at its right edge (#1448)
2026-10-23 17:29:17 -04:00
Brandon Thomas 98f957ed6b Merge storytold/main into fix/rtl-first-line-indent
# Conflicts:
#	crates/compose/src/tests.rs
2026-10-23 17:29:07 -04:00
Brandon Thomas 17d197dbef Merge pull request #1567 from Hamza0101/fix/insert-pages-count
A page count Insert Pages cannot mean is refused
2026-10-23 17:29:02 -04:00
Brandon Thomas 44ddf8e857 Merge pull request #1553 from PiMinusMax/gradient-drag-to-swatches
Gradient panel: drag the gradient onto the Swatches panel to keep it
2026-10-23 17:28:58 -04:00
Brandon Thomas 3e783b2671 Merge pull request #1562 from Hamza0101/fix/duplicate-page-in-export-list
A page named twice in an export list is exported once
2026-10-23 17:28:54 -04:00
Brandon Thomas 515796aa1c Merge pull request #1571 from Hamza0101/fix/unique-anchor-name
A text anchor's name is the document's, so it is not reused
2026-10-23 17:28:50 -04:00
Brandon Thomas fc2e42738c Merge pull request #1397 from Silvertree2010/fix/h951-tagged-text-export-strips-from-s
Keep ':', '<', '>' and '\' in Tagged Text style names
2026-10-23 17:28:47 -04:00
Brandon Thomas 132a0816e1 Merge pull request #1376 from Silvertree2010/fix/h869-table-alternating-fill-counts-ar
Saturate table alternating-fill and index paragraph counts
2026-10-23 17:28:43 -04:00
Brandon Thomas 4144b7414d Merge pull request #1378 from Silvertree2010/fix/1337-bug-unable-to-insert-a-multi-pag
Refuse PDF page ranges in the Place PDF dialog instead of using page 1
2026-10-23 17:28:39 -04:00
Brandon Thomas e3ac9936a6 Merge pull request #1371 from Hamza0101/fix/backend-log-says-what-happened
Graphics: the start-up log says which backend was chosen and how to change it
2026-10-23 17:28:35 -04:00
Brandon Thomas bd418b3913 Merge pull request #1383 from Silvertree2010/fix/1340-bug-the-preview-box-in-the-parag
Remember the Preview checkbox in Paragraph/Character Style Options
2026-10-23 17:28:32 -04:00
Brandon Thomas b892eccaa8 Merge pull request #1368 from Silvertree2010/fix/h836-pica-cicero-formatting-shows-0p0
Fix "-0p0" for tiny negative pica/cicero values
2026-10-23 17:28:27 -04:00
Brandon Thomas dd9ab4b6d9 Merge pull request #1369 from Silvertree2010/fix/h850-polygon-side-count-is-truncated
Clamp polygon side count before narrowing to u32
2026-10-23 17:28:24 -04:00
Brandon Thomas 45048c0735 Merge pull request #1631 from storytold/test/backfill-regression-tests
Regression tests for #248, #249 and #329
2026-10-23 17:28:20 -04:00
Brandon Thomas 306292c750 Merge storytold/main into test/backfill-regression-tests
# Conflicts:
#	crates/ui-egui/src/menus.rs
2026-10-23 17:28:11 -04:00
Brandon Thomas abda81d473 Merge pull request #1661 from marcoarnulfo/fix/align-key-object
Align: a click on one of several selected objects makes it the key object
2026-10-23 17:28:06 -04:00
Brandon Thomas 0092906ea8 Merge pull request #1664 from MarekSpodBiedry/issue-1623
idml: explicit zero cell edge weights hide the default table border (#1623)
2026-10-23 17:28:02 -04:00
Brandon Thomas f0907d3831 Merge pull request #1665 from MarekSpodBiedry/issue-1624
find: search and change text inside table cells in document scope (#1624)
2026-10-23 17:27:58 -04:00
Brandon Thomas f3ad8f9a68 Merge pull request #1667 from MarekSpodBiedry/issue-1655
Make the start screen scrollable on short windows (#1655)
2026-10-23 17:27:55 -04:00
Brandon Thomas c6dc102524 Merge pull request #1669 from Silvertree2010/fix/1474-color-settings-a-loaded-icc-work
Reload ICC profiles loaded in Color Settings at start-up
2026-10-23 17:27:51 -04:00
Brandon Thomas fd0d0434de Merge pull request #1675 from Silvertree2010/fix/1589-audit-dc-08-non-finite-idml-numb
Keep non-finite IDML numbers out of imported documents
2026-10-23 17:27:47 -04:00
Brandon Thomas b84f268430 Merge storytold/main into fix/1589-audit-dc-08-non-finite-idml-numb
# Conflicts:
#	crates/idml/src/tests.rs
2026-10-23 17:27:37 -04:00
Brandon Thomas 3c8b863abf Merge pull request #1683 from marcoarnulfo/feat/save-dialog-folder
Save and export dialogs start in the document's folder, or the last one used (#1653)
2026-10-23 17:27:32 -04:00
Brandon Thomas c882fd0f58 Merge storytold/main into feat/save-dialog-folder 2026-10-23 17:27:23 -04:00
Brandon Thomas 597fc5c900 Merge pull request #1574 from Hamza0101/fix/character-size-bounds
A type size outside 0.1 to 1296 pt is refused
2026-10-23 17:27:18 -04:00
Brandon Thomas a627c88e45 Merge pull request #1396 from Silvertree2010/fix/h957-rtf-import-wraps-out-of-range-un
Drop out-of-range RTF \uN values instead of wrapping them
2026-10-23 17:27:14 -04:00