Commit Graph
2825 Commits
Author SHA1 Message Date
skylar taylor-barrick 5aeb4dd743 Merge pull request #1236 from skylartaylor/linked-path-checks
Follow paths stored in documents only on this computer or the document's share
2026-10-17 13:57:26 -06:00
Aykut FiratandClaude Opus 5.5 08ce444054 Tables: cell First Baseline offset (Cell Options › Text › First Baseline)
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>
2026-10-17 15:07:46 -04:00
skylar taylor-barrick 9fd0a881f7 Merge storytold/main into linked-path-checks
The conflict was in links.rs, where main's atomic relink work (b050343a) and
this branch's path gate both changed `update`. Kept main's mechanism (build the
replacement with relinked_asset, then insert it) and this branch's gate (a link
craft-docpath refuses is missing and never read).

relinked_asset now takes the path to read and the link to record separately.
Previously they were one argument, safe only because update passed the raw stored
link; passing the resolved path to the old signature would have rewritten every
relative link to an absolute one on each refresh.

Also passes None for the document in main's embedded-status test, where the asset
has no link so the document is irrelevant.
2026-10-17 12:39:14 -06:00
skylar taylor-barrick d149123cd3 Build: take craft-docpath from the merged craft-libs rev
craft-libs#169 is merged, so the fork pin is no longer needed. Pinned to
storytold/craft-libs 82a24b00 (main after the merge) rather than the older
12281d07, which predates resolve_absolute and the Windows colon refusal.
2026-10-17 12:02:18 -06:00
ghanashyam03 636277c69f docs: fix broken parity checklist link 2026-10-17 20:35:40 +05:30
MarekSpodBiedry f633cf54dd PDF/X-4 export: add xmp:MetadataDate and xmpMM:VersionID to the XMP (#1207) 2026-10-17 15:07:14 +02:00
MarekSpodBiedry b13b1ec408 Keep the mapped style of the first paragraph when placing text at an empty caret (#1208) 2026-10-17 15:05:08 +02:00
NetterSilverandClaude Haiku 5.5 7762573344 Keep a moved equation in place when editing its LaTeX
Found while testing crates/engine/src/cmd/mathexpr.rs:73-83

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 12:39:38 +00:00
MarekSpodBiedry 1b1a66ee77 Make the dock collapse and expand chevrons clickable (#1203) 2026-10-17 14:36:00 +02:00
NetterSilverandClaude Haiku 5.5 485a964e94 Reject a non-finite or non-positive --scale in designcraft-cli run
Found while testing apps/designcraft-cli/src/main.rs:361 (`--scale` parse) and :386 (export); crates/render/src/lib.rs:422-423 (render_page)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 08:51:07 +00:00
Claude 3eb7b5085b Tools: readouts measure in the document's ruler units
Tool readouts (the Page tool's size while dragging, smart-guide distances, the
resize readout) took their unit from the UI's own setting, which nothing changes
from picas, so a document set to inches read in picas. The tool context now takes
the active document's horizontal ruler unit, and the Page tool's W/H use the
horizontal and vertical units, as the Control and Properties fields do.

Test: tool_readouts_measure_in_the_documents_units (picas before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-17 06:27:34 +00:00
NetterSilverandClaude Haiku 5.5 ec4fbb270f Ignore NaN and infinite numbers when importing IDML
Found while testing crates/idml/src/import.rs:2748 (stroke_from: StrokeWeight, MiterLimit), also El::num in crates/idml/src/xml.rs:96 and the plain `.parse().ok()` calls around import.rs:1833, 2823 and 2832

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 06:20:21 +02:00
skylar taylor-barrick fc36957fe0 Ignore the local outputs/ folder
Scratch exports from running the app and the CLI land in outputs/. It is
not ignored, so `cargo xtask assets` — which scans tracked and untracked
files alike — reports every PNG and PDF in it as an asset with no row in
ASSETS.md, and the check cannot pass on a machine that has ever run the
app with an output directory.
2026-10-16 22:00:52 -06:00
skylar taylor-barrick 61b1a3b08d Merge pull request #150 from skylartaylor/codex/fix-relink-eps
Merges upstream/main into the branch, resolving 12 conflicted files, and reconciles where the two sides meant different things — notably the format version, where both had independently defined version 2 (EPS sources here, pinned paragraph defaults on main), so a document without EPS was being written as version 1 and re-upgraded on load.

Verified locally against main b17efb2d: cargo test --workspace --no-fail-fast 2869 passed / 0 failed, cargo fmt --check clean, cargo clippy --workspace --all-targets -D warnings clean, xtask layers and wasm ok.
2026-10-16 21:55:21 -06:00
NetterSilverandClaude Haiku 5.5 2cc21e19b2 Ignore non-finite w:sz, w:spacing and w:ind values in DOCX import
Found while testing crates/textimport/src/docx.rs:183 (run_attrs, w:sz) and :206-214 (para_attrs, w:spacing/w:ind via the `tw` closure)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 04:55:36 +02:00
skylar taylor-barrick b17efb2ddf Merge pull request #1164 from Hamza0101/fix/gpu-failed-fallback
Hamza's diagnosis of the forgotten OpenGL failure, with the filter reordered so it covers any backend and does not hold another machine's record against this one, plus a regression test.

No workflow runs on this PR: every one is path-filtered and apps/designcraft/src/gpu/backend.rs matches none. Verified locally on 653f83b8 instead — cargo test --workspace --no-fail-fast: 2847 passed, 0 failed, 5 pre-existing ignores; cargo fmt --check clean.
2026-10-16 20:51:25 -06:00
skylar taylor-barrick 653f83b8cb Startup: keep the backend a start was on, whichever it is, and cover it
Builds on the fix in this branch, which spotted that a failed OpenGL was
being forgotten because `failed` is filtered to this platform's
candidates and OpenGL is no candidate off Windows.

Rather than spare OpenGL from the filter, run the filter before the
previous start's backend is added. A stored entry that is no candidate
here came from another machine and still says nothing, so it is dropped
as before; the backend a start was actually running on is added
afterwards and stays, whichever backend it is. That keeps the same crash
out of the next instance without naming OpenGL or the platform, and
without holding a failure recorded on someone else's machine against
this one.

Adds the regression test: on macOS, where Metal is the only candidate, a
start left on OpenGL has to keep it out of the instance, while a stored
OpenGL entry that never ran here is dropped.
2026-10-16 20:46:40 -06:00
skylar taylor-barrick c43a63f71e Reconcile this branch's EPS work with main's placement and format changes
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.
2026-10-16 20:20:53 -06:00
skylar taylor-barrick bc840130a4 Satisfy clippy's nonminimal_bool on rustc 1.96
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.
2026-10-16 20:20:36 -06:00
aiongg 1977a67886 Build: use craft-docpath from craft-libs 2026-10-17 02:20:16 +00:00
skylar taylor-barrick 0d541deab7 Merge upstream/main into codex/fix-relink-eps
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.
2026-10-16 19:57:08 -06:00
NetterSilverandClaude Haiku 5.5 3823d7d942 Ignore out-of-range font sizes in RTF import
Found while testing crates/textimport/src/rtf.rs:219

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 01:22:17 +00:00
NetterSilverandClaude Haiku 5.5 61387304b6 Ignore non-finite <cSize> values in Tagged Text import
Found while testing crates/textimport/src/tagged.rs:173

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 23:26:08 +02:00
NetterSilverandClaude Haiku 5.5 81cc1404b8 Skip phonetic guide text when importing XLSX strings
Found while testing crates/textimport/src/xlsx.rs:62 and :112 (shared strings are read with El::text, which includes <rPh> children; inline strings use the same call, crates/textimport/src/docx.rs:37)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 20:22:58 +02:00
Claude beb5ac0243 Merge upstream main into drop-cap-size
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-16 17:11:07 +00:00
aiongg 8c3bbdc09f Read images inside SVGs only from data: URLs 2026-10-16 17:05:09 +00:00
aiongg 248e10908b Follow paths stored in documents only on this computer or the document's share
Links, data sources, IDML package links and book chapters go through
io::document_path (craft-docpath) before they reach the file system:
relative paths resolve beside the document, and paths to other computers,
devices and URLs are missing, with the reason in links.list and Preflight.

IDML and INDD packages read a linked file where its link points on this
computer, then from the link's trailing names beside the package, only
when it is a regular file up to 256 MB holding an image or a graphic. A
file URI that names a host keeps it as a network path.
2026-10-16 17:05:09 +00:00
NetterSilverandClaude Haiku 5.5 4b520066e3 Remove empty pages autoflow adds when placing into the primary frame
Fixes #1165

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:58:01 +02:00
Hamza 5316059405 Graphics: keep a failed OpenGL out of the instance (macOS)
`choose` pruned the failed list to this platform's candidates, which dropped an
OpenGL entry on macOS, where Metal is the only candidate. But OpenGL is not only
a candidate: off Windows it is the in-process fallback that `instance_backends`
adds whenever it has not failed. So a start that recorded OpenGL and never
showed a frame had the entry pruned a line later, and OpenGL went straight back
into the instance — the backend that had just failed was offered again on every
start, with nothing able to retire it.

An entry that can still be reached is kept now. A non-candidate entry still
cannot be chosen as a backend, since `pick` only looks at candidates, so which
backend starts is unchanged; it only stops a failed OpenGL being handed back to
the instance.

This is what `a_start_records_its_backend_until_a_frame_is_presented` asserts,
and that test failed on macOS: `cargo xtask ci` stopped in the `designcraft` bin
before the rest of the workspace ran, so the gate could not go green there at
all.
2026-10-16 20:23:31 +05:00
Abdelrehman Fouad d78783b6bd Fonts: Type › Reload Fonts reads fonts changed on disk again
Fonts installed, edited or removed while the app runs needed a restart
(#328, #547). font.reload rescans the font folders, lets go of the shared
faces whose installed file changed (length or modification time) or is
gone, so the next lookup reads the file as it is now, and recomposes the
open documents with a new composition cache. It isn't an undo step.
2026-10-16 17:15:47 +02:00
aiongg 4a2f603771 Integration: #404's case test is already on main 2026-10-16 14:14:34 +00:00
aiongg c23e60291f Merge #404 update 2026-10-16 14:11:22 +00:00
aiongg 062443906c Merge #402 update
# Conflicts:
#	crates/engine/src/cmd/file.rs
2026-10-16 14:11:22 +00:00
aiongg c2609f921b Merge pull request #1139 from aiongg/next
Integration batch: 197 PRs on main
2026-10-16 10:08:19 -04:00
aiongg 8e18800280 Integration: #1075 and #1077 progress log lines 2026-10-16 12:43:06 +00:00
aiongg 3294c4a9bb Merge #1077 update 2026-10-16 12:42:33 +00:00
aiongg f90c0de884 Merge #1075 update 2026-10-16 12:42:32 +00:00
aiongg 95337b96f3 Merge #305 update 2026-10-16 12:42:08 +00:00
harrisonoconnorhover 91a32730ef fix: allow deleting parent pages (#956) 2026-10-16 08:02:23 -04:00
Hamza cf5b54e72c Record the Greek language in the work list
gaps.md's header asks for a ROADMAP progress-log line and a timestamp when a gap
is closed or shrunk. Gap 13 was shrunk in the first commit (four hyphenating
languages became five); this adds the two it was missing.

Docs only; the fix itself is unchanged.
2026-10-16 16:06:36 +05:00
Hamza b5cc353c6d Close gap 27 in the work list
gaps.md asks for it in its own header: "When you close a gap, delete its entry
(or shrink it), add a line to the ROADMAP progress log and update the
timestamps." The entry was still listed, which is how a second contributor picks
up work that is already done.

Docs only; the fix itself is unchanged.
2026-10-16 16:06:09 +05:00
Youssef Azriouil e6878edac2 Shaping: Arabic keeps contextual alternates
Contextual alternates are part of how many Arabic fonts join (connecting
strokes, tatweel and letter variants). InDesign keeps them in Arabic text
when Contextual Alternates is off, so `calt` off is now dropped for
Arabic runs.
2026-10-16 11:55:18 +02:00
Youssef Azriouil ec86a8fd3c Breaker: keep a page number's digits together
The emergency break inside a word wider than the measure could fall
between glyphs of one source character: an automatic page number wider
than its frame came out as "13" over "4". Glyphs sharing a cluster (the
generated digits of a page number, multi-glyph clusters) now stay together
and the number hangs out of its frame, as in InDesign.
2026-10-16 11:55:18 +02:00
aiongg 852db92b05 Merge branch 'fix-macwin' into next-integ 2026-10-16 06:40:54 +00:00
aiongg f309b08562 Integration: #1036 test that a selected group paints both ports of its text frame 2026-10-16 06:40:28 +00:00
aiongg e99783c756 Integration: "&" shows in native menu labels 2026-10-16 06:40:28 +00:00
sanyamsingh001andCodex 745712fa7d Merge tested main a930276fd7 into PR #305
Preserve the reviewed PR behavior and tested upstream base.

Co-Authored-By: Codex <codex@openai.com>
2026-10-16 16:36:49 +10:00
aiongg 98be512f79 Merge branch 'fix-panelmenu' into next-integ 2026-10-16 06:27:33 +00:00
aiongg debcc641c3 Merge branch 'fix-esc' into next-integ 2026-10-16 06:27:33 +00:00
aiongg 11810ecbfc Integration: panel menus stay reachable in the docking layout 2026-10-16 06:27:17 +00:00