Commit Graph
5102 Commits
Author SHA1 Message Date
NetterSilverandClaude Haiku 5.5 58d94f6122 Hash PDF page contents without caching a decoded copy per page
Fixes #3570

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:43:59 +07:00
bflatastic 07762956d2 Cap path elements in DXF import across the whole file
Squashed from #3800 onto main.
2026-10-24 01:43:58 +07:00
NetterSilverandClaude Haiku 5.5 609132987b Bound DXF import work for nested inserts that produce no nodes
Fixes #3572

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:43:58 +07:00
bflatastic 5455e9be07 Cap the total array insert copies in a DXF import
Squashed from #3789 onto main.
2026-10-24 01:43:57 +07:00
NetterSilverandClaude Haiku 5.5 23bc1c0027 Fix quadratic paper layout de-duplication in DXF import
Fixes #3595

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:43:56 +07:00
bflatastic fd7c2eb977 Charge gstate and currentgstate path copies to the memory budget
Squashed from #3822 onto main.
2026-10-24 01:43:56 +07:00
bflatastic 246750c147 Charge and bound EPS image sample planes on import
Squashed from #3821 onto main.
2026-10-24 01:43:55 +07:00
NetterSilverandClaude Haiku 5.5 0b6097e572 Charge PostScript filter output to the EPS interpreter budget
Fixes #3567

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:43:54 +07:00
NetterSilverandClaude Haiku 5.5 3867e87036 Fix quadratic PostScript search in the EPS importer
Fixes #3582

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:43:54 +07:00
NetterSilverandClaude Haiku 5.5 abe277462b Keep ASCII85 output from starting its first line with '%'
Found while testing crates/eps/src/ps.rs:190-197 (ascii85)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:43:53 +07:00
NetterSilverandClaude Opus 5.5 b3df3d2069 Raise undefinedresult for non-finite EPS arithmetic instead of panicking
Fixes #3585

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 01:43:52 +07:00
Taha-Mahmoodi b9819ebd89 i18n: every catalog translates "PDF security settings are not an object"
#3836 added the message without @msg rows, so
complete_languages_translate_every_message fails on main (cs first, then
every language in COMPLETE_MESSAGES). Each row follows the catalog's own
"PDF settings are not an object" row and its word for Security.
2026-10-24 01:43:51 +07:00
aiongg 6757720bba Packaging: pin the signing client and appimagetool, and check their hashes (#3268)
* Packaging: pin the Windows signing client and check its hash

* Packaging: pin appimagetool and check its hash

* Packaging: pin the AppImage runtime, and stop clearly without a pinned hash

appimagetool otherwise embeds the unpinned type2-runtime continuous build. An
architecture with no pinned tool or runtime now exits with a message instead of
failing the hash check on an empty hash.
2026-10-23 14:06:11 -04:00
Dylan M. Taylor c6e6c23b99 packaging: use [[ for bash conditional tests (SonarCloud S7688) (#3853)
SonarCloud flags every bare [ conditional in bash scripts under packaging/ as a reliability smell (rule S7688). Convert the flagged [ ... ] tests to [[ ... ]]: safer word-splitting and no glob surprises, same semantics for these string and file tests.
2026-10-23 13:21:42 -04:00
Dylan M. TaylorDylan M. Taylorcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
125df6d8ec G9: Preserve supplied passwords when confirming the Save PDF dialog (#3836)
Co-authored-by: Dylan M. Taylor <277927+dylanmtaylor@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-10-23 10:15:23 -04:00
BFlat 4a7cba0dd3 Merge pull request #3763 from Silvertree2010/fix/3588-audit-dxf-import-degenerate-spli
Stop tiny DXF spline weights from splitting every span to the cap
2026-10-23 12:00:01 +07:00
NetterSilverandClaude Opus 5.5 fb53e53eaf Stop tiny DXF spline weights from splitting every span to the cap
Fixes #3588

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:59:46 +07:00
BFlat 8906073438 Merge pull request #3762 from Silvertree2010/fix/3590-audit-dxf-import-hatch-source-ha
Stop DXF hatch source-handle loop at first missing handle
2026-10-23 11:50:04 +07:00
NetterSilverandClaude Haiku 5.5 77d1f8901f Stop DXF hatch source-handle loop at first missing handle
Fixes #3590

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 11:38:06 +07:00
BFlat 4c656c585c Merge pull request #3761 from dotCooCoo/feat/linux-pen-pressure
Linux: a tablet pen's pressure reaches the tools under X11 and XWayland
2026-10-23 11:31:32 +07:00
dotCooCoo 44b1310f49 Linux: a tablet pen's pressure reaches the tools under X11 and XWayland
On Linux under X11, and under XWayland, winit 0.30 hands a drawing
tablet's pen to the window as a mouse without its pressure. Every pen
stroke reached the tools at full pressure: a Calligraphic brush with
Size on Pressure drew one width, and the Liquify tools' Use Pressure
Pen applied full intensity.

When the window is on X11, the desktop app now reads XInput2 raw
events on a second X connection (x11rb's RustConnection, without
unsafe). A device with an "Abs Pressure" valuator is a pen, unless
its XInput type is TOUCHPAD or TOUCHSCREEN. Its pressure, scaled from
the valuator's range to 0..1, goes into Services::stylus, and another
pointer moving clears it. The canvas uses that pressure when a frame
has no touch force. A press takes the highest pressure of the pen's
latest touch since the canvas last read the feed, and waits up to
5 ms for the touch of a hovering pen. The moves and the release of a
held press keep the pressure the pen last touched with when its lift
has already arrived. Native Wayland is unchanged.

The valuator mapping and the reader come from PhotoCraft's tablet
crate (storytold/photocraft#255), with the pressure axis only.

Docs: README.md, docs/development.md, docs/hardware-parity.md,
docs/target-app-parity.md.
2026-10-23 11:31:17 +07:00
BFlat 0dbb67c1ff Merge pull request #3760 from Silvertree2010/fix/3589-audit-dxf-import-symbol-name-uni
Make DXF import symbol-name uniquing linear
2026-10-23 11:20:42 +07:00
NetterSilverandClaude Haiku 5.5 b16f44d87f Make DXF import symbol-name uniquing linear
Fixes #3589

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 11:20:15 +07:00
BFlat 6e1db2acd7 Merge pull request #3757 from Silvertree2010/fix/3591-audit-live-pathfinder-effects-ha
Cap the input of live Pathfinder effects
2026-10-23 11:08:22 +07:00
bflatastic c27ff0d96b Live Pathfinder budget: allow the manual lowest-bit form clippy flags, for rust-version 1.95 2026-10-23 11:08:06 +07:00
bflatastic d50afbcc1d Live Pathfinder budget: lowest set bit without the unstable isolate_lowest_one (rust-version 1.95) 2026-10-23 11:08:06 +07:00
NetterSilverandClaude Opus 5.5 c770e900e3 Cap the input of live Pathfinder effects
Fixes #3591

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:08:06 +07:00
BFlat 1ef873639e Merge pull request #3758 from KaboomFox/p7-foreign-svg-attributes
SVG: keep other applications' attributes from import to export
2026-10-23 10:56:15 +07:00
Louise FoxandClaude Opus 5.5 8906abf30d SVG: keep other applications' attributes from import to export
Many tools note things on SVG objects in attributes of their own XML
namespace: a plotter's pen, a cutter's passes, a game engine's
collision flag. Import dropped them, so a file that went through
VectorCraft lost what other software had set on its objects. #522
asked for unknown and data-* attributes to survive a round trip; #580
kept the data-* ones, and this keeps the ones in other applications'
namespaces.

- Import keeps every attribute in a namespace that isn't SVG's,
  XLink's, XML's, Inkscape's, Sodipodi's or VectorCraft's own, on the
  object or layer it belongs to, in order, with its namespace URI and
  the prefix the file gave it (ObjectAttributes::foreign, beside the
  data-* attributes and the event handlers). The file is untrusted: at
  most 64 per object and 64 KiB per value, and what is left out is
  warned about. Files that declare no other namespace skip the scan.
- They are the object's own, as its data-* attributes are: a pasted
  copy and a duplicate keep them, and deleting the object takes them
  with it. The native file keeps them in the object's attributes, a
  key written only when an object has some.
- Export writes them back on the same elements and declares each
  namespace once, on the root, under the file's prefix. A prefix the
  export uses itself, or that another namespace already has, becomes
  prefix2, prefix3...; one XML keeps for itself (xml...) becomes ns. A
  name or value XML can't hold is left out with a warning.

Nothing in VectorCraft reads them, and nothing in the UI lists them.

svg/tests/foreign_attributes.rs: a layer's and a shape's attributes
survive import, export and import again, Inkscape's and Sodipodi's
own aside and with no warnings, and the native form round-trips;
prefixes are made unique, and bad names and values are left out with
a warning; the caps hold and are warned about once.
engine tests_attributes.rs: a pasted copy and a duplicate keep them, a
deleted object leaves none behind, and the native file and SVG export
keep them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HhvnnnD5fTFupK8WWq35un
2026-10-23 10:56:00 +07:00
BFlat 074b4a2670 Merge pull request #3753 from Taha-Mahmoodi/fix/pdf-import-drift
PDF import: keep a line's glyphs on course when the file's widths are a little off the font's advances
2026-10-23 10:42:59 +07:00
Taha-Mahmoodi fb74be021f Docs: file-format-parity's status line carries the PDF import spacing change
Review follow-up (CodeRabbit): the revision rows were dated 2026-10-23 but
the status line still read 2026-10-21 and didn't mention the change.
2026-10-23 10:42:45 +07:00
Taha-Mahmoodi b6b1ec7300 PDF import: keep a line's glyphs on course when the file's widths are a little off the font's advances
Cause: since #3742 place_each measures a line's spacing from the file's
own widths, so tracking is only the file's Tc/Tw/TJ. Where the widths
are systematically off the installed font's advances (up to the 1% that
still counts as the same font), those differences add up along a line
and nothing made up for them. With no kerning and every tracking value
0, place_each returned the untracked layout early, without the 0.02 em
placement check (CodeRabbit's review of #3742): a line of embedded
Source Sans 3 with /Widths 0.8% wide opened 3.7 pt off. With the early
return removed the check rejects the line and the line-wide fit takes
over: one whole-thousandth tracking value with the font's kerning,
0.30 pt off (as before #3715). Before #3742 main placed it exactly but
with a run per character (49 and 62 runs).

Change: the early return is gone; every line goes through the check.
Before it, on_course() keeps the file's spacing where the glyphs stay
within 0.01 em of the file's; otherwise each stretch of the line takes
one share after every character (the longest stretch one share keeps
within 0.01 em), so ordinary text stays one run, and a line whose
differences change course (30 m then 30 i) takes a run per stretch (2).

Verification: new test
a_long_line_of_widths_a_little_off_the_fonts_advances_lands_in_one_run
(embedded Source Sans 3, widths x1.008 and x0.992, a kerned and an
unkerned line): one run each, glyphs under 0.24 pt (0.02 em) from where
the file draws them. Without on_course it fails after #3742, with and
without the early return ("glyphs 0.300 pt"); before #3742 it fails on
the run count. It replaces an Inter test drafted for the review: Inter
isn't embedded there, so the file's outlines are the interpreter's
stand-in stretched to the widths, not Inter, and the contours differ by
0.6 pt even with exact widths. tests_text_placement and
text_becomes_point_type pass; cargo xtask ci: all 10 steps passed.

Thanks to the CodeRabbit review on #3742 for the early-return finding.
2026-10-23 10:42:45 +07:00
BFlat ccec72a82d Merge pull request #3752 from Taha-Mahmoodi/fix/3705-paste-draw-inside
Fix #3705: pastes follow Draw Inside and Draw Behind, and Shift+D no longer sticks in Draw Behind
2026-10-23 10:22:33 +07:00
Taha-Mahmoodi 26daaf1153 Fix #3705: Draw Inside's mask gets ids of its own, and an artboard alone pastes no clip group
Review follow-up (CodeRabbit): the clip group's mask copied the target with
only a new root id, so a compound path's subpaths had the same ids in the
mask and in the object. The mask is now Document::reid's copy. Paste on All
Artboards with only an artboard on the clipboard made an empty Draw Inside
clip group; it now needs objects to paste.

draw_inside_a_compound_path_gives_its_mask_ids_of_its_own: without the
change an id is used twice (7 ids for 6 nodes).
2026-10-23 09:56:08 +07:00
Taha-Mahmoodi eb4635fd4b Fix #3705: pastes go inside the object in Draw Inside, and Shift+D no longer stops at Draw Behind
The drawing-modes help page
(https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/learn-drawing-basics/drawing-modes-overview.html)
has you draw or paste into the selected object in Draw Inside. It also says
the modes apply to Paste in Place and Paste on All Artboards but not to Paste
in Front or Paste in Back.

Cause: only new art (create::insert_look) read the drawing mode. The paste
commands (edit::paste_clip) always used the insertion parent, so a paste in
Draw Inside landed on the layer above the object, outside the clip.
Double-clicking the object first only isolated the bare path, which didn't
change where the paste went. Separately, view.drawMode {} went from Draw
Behind to Draw Inside whenever one object was selected, then refused it unless
the object was a path, compound path or type. So with one group selected
(such as the clip group Draw Inside makes), Shift+D and the toolbar button
failed every time and stayed in Draw Behind.

Change: the clip-group wrapping moves into create::draw_inside_group, which
new art and pastes now share. In Draw Inside, Paste, Paste in Place and Paste
on All Artboards insert the copies at the top of that group, in the paste's
one undo step, ignoring Paste Remembers Layers. In Draw Behind, Paste in Place
and Paste on All Artboards go just below the selection, as Paste in Back does.
Paste in Front, Paste in Back and pasted artboards keep their placement.
Shift+D goes on to Draw Inside only when it can draw into the selection, and
otherwise back to Draw Normal.

Verification: pasting_in_draw_inside_puts_the_copies_inside_the_object,
paste_in_place_in_draw_behind_goes_behind_the_selection and
shift_d_goes_past_draw_behind_whatever_is_selected all fail without the
change ("Layer" != "Clip Group"; index 3 != 0; the Draw Inside error on a
selected group). cargo xtask ci: all 10 steps passed.
2026-10-23 09:56:07 +07:00
BFlat a537a1b5bd Merge pull request #3751 from Taha-Mahmoodi/feat/artboard-center-mark
Artboards: Artboard Options shows a center mark and cross hairs on the canvas
2026-10-23 09:55:45 +07:00
BFlat 39a14cef7e Merge pull request #3750 from Taha-Mahmoodi/feat/simplify-opens-auto
Simplify: Object › Path › Simplify opens its slider at the Auto-Simplify level for the selection
2026-10-23 09:55:29 +07:00
BFlat 6d1fe490da Merge pull request #3749 from Silvertree2010/fix/3598-audit-rendering-depth-counters-a
Restore render depth counters after a caught panic
2026-10-23 09:43:04 +07:00
Taha-Mahmoodi 64f6d2db50 Artboards: Artboard Options' Show Center Mark and Show Cross Hairs draw on the canvas
The Artboard Options help pages describe two display options
(https://helpx.adobe.com/illustrator/desktop/create-manage-artboards/organize-manage-artboards/modify-display-settings-of-artboards.html,
.../set-video-display-options-for-artboards.html): a mark at the artboard's
center, and lines from the middle of each side through the center. The
document already had show_center_mark and show_cross_hairs on Artboard, but
nothing set or drew them.

artboard.setProps (each `artboards` entry too) and artboard.new take
showCenterMark and showCrossHairs as true/false, in the same single undo
step as the other fields; a locked artboard can still change them.
Artboard Options has both checkboxes, filled in from the artboard whether
it opens from the panel or a double-click with the Artboard tool, and its
New Artboard form passes them to artboard.new. The canvas draws them in the
new theme token artboard_mark, 1 point wide on screen at any zoom: a cross
12 points across at the center whose arms follow the artboard's sides, and
the two cross hairs. They are screen-only like the edges; exports and print
never read the fields. inspect_document reports them when on. Saved files
are unchanged: the two keys were already always written, so a document that
never shows them saves byte for byte as before, and a file without the keys
opens with both off. Video safe areas, video rulers and the pixel aspect
ratio are not part of this change.

Verification: artboard_display_marks_are_set_and_cleared_in_one_undo_step,
artboard_display_marks_round_trip_through_the_native_format,
artboard_display_marks_stay_out_of_exports (SVG and PDF identical with the
marks on and off), an_artboard_shows_its_center_mark_and_cross_hairs
(positions, screen-constant size under zoom, rotated view) and
artboard_options_show_center_mark_and_cross_hairs. cargo xtask ci: all 10
steps passed.
2026-10-23 09:42:09 +07:00
Taha-Mahmoodi 08cfb45561 Simplify: Object › Path › Simplify opens its slider at the Auto-Simplify level for the selection
The Simplify help page says the slider starts at an auto-simplified value
(https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-paths/manually-simplify-paths.html).
The slider opened at a fixed level 50 (1 pt), whatever the size of the
selection, so the first preview was the same tolerance for a 30 pt icon as
for a 1000 pt drawing.

The level Auto-Simplify picks for the selection is now one engine function,
vectorcraft_engine::auto_simplify_level (the existing 1/400-of-the-longer-
side rule in vectorcraft_pathops), which object.path.simplify {auto: true}
and the slider's opening fields both use. Object › Path › Simplify (and
ui.menuDialog, the Properties and contextual task bar buttons, which go
through the same menu dialog) opens the slider there, and the canvas
previews that result; Auto-Simplify still moves the slider back to it.
The retained Simplify dialog path is unchanged.

Verification: simplify_slider_opens_at_the_auto_simplify_level_of_the_selection
opens the slider on 1140, 285 and 28.5 pt waves (levels 35, 55, 89) and
checks the preview is exactly object.path.simplify {auto: true}'s result;
without the change it fails with level 50 != 35, and
simplify_opens_a_slider_whose_drag_previews_fewer_or_more_points fails with
{"level": 50} != {"level": 55}. cargo xtask ci: all 10 steps passed.
2026-10-23 09:42:07 +07:00
NetterSilverandClaude Haiku 5.5 2f620f8f31 Restore render depth counters after a caught panic
Fixes #3598

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 09:26:06 +07:00
BFlat 4cd20845e0 Merge pull request #3686 from dotCooCoo/feat/export-for-screens-off-ui-thread
Export for Screens: files are encoded and written on the background thread
2026-10-23 09:23:49 +07:00
BFlat 5ae42b885d Merge pull request #3742 from Taha-Mahmoodi/fix/pdf-import-run-split
PDF import: keep one tracking value on letters whose file widths round off the installed font's advances
2026-10-23 09:23:34 +07:00
dotCooCoo ddaca94e5c Export for Screens: files are encoded and written on the background thread
Export for Screens and the Asset Export panel's Export encoded and wrote
every file on the UI thread, so the window stopped responding until the
last file was written. For 50 artboards in PNG at 1x, 2x and 3x, PDF and
SVG (250 files, 47 MiB), the dialog's OK took a median of 43.8 s in a
release build on Windows.

With Enable Background Export on (Preferences › File Handling), OK now
checks the settings, remembers them and takes a snapshot of the
document, and the dialog closes. The thread that writes background
saves and exports then encodes the files and writes them into the
folder, or one ZIP in it, and the export progress dialog's Cancel stops
it before the next file. The same OK takes under 0.001 s, and the files
have the same names and bytes. With the preference off, without a
folder, on the web and over MCP and scripts (document.exportForScreens
and assets.export), the files are made at once with the same reply as
before.

Both commands report one progress step per file, so the progress dialog
shows "File 3 of 250" and MCP progress notifications count the files in
place of the encoders' artboards and pages.

Docs: docs/target-app-parity.md, docs/control-protocol.md, docs/mcp.md.
2026-10-23 09:22:20 +07:00
Taha-Mahmoodi b87cda7d4b PDF import: keep one tracking value on letters whose file widths round off the installed font's advances
Cause: place_each (crates/pdf/src/import_text.rs, #3715) works out each
character's tracking as the file's distance between glyph origins minus
the installed font's advance. A PDF gives widths to the thousandth of an
em (the standard-14 AFM metrics or /Widths), so with a font of 2048 units
an em (Helvetica on macOS) every character is a hair (~0.0002 em) off.
When the line isn't evenly spaced as a whole (a TJ word gap, a space read
from a gap), `even` keeps every character's own value, rounding noise
included, and restyled() splits the line into a run per character.
text_becomes_point_type failed on macOS; Linux CI passed because Helvetica
isn't installed there, its stand-in's widths differ by more than 1% and
place_each falls back to the line-wide fit.

Change: measure the spacing from the file's own widths: each character's
pen is moved by how much wider the file says the characters before it are
than the font's advances, where the file gives the character's width and
the layout sets it as a glyph of its own. The tracking is then the file's
(Tc, Tw, TJ), whatever font is installed; the layout check that the glyphs
land within 0.02 em of the file's places is unchanged.

Verification: text_becomes_point_type and all of tests_text_placement pass
on macOS. New test widths_rounded_off_the_installed_fonts_advances_keep_one_tracking
uses built-in Inter (non-embedded, widths rounded to thousandths), so it
doesn't depend on system fonts; without the fix it fails on any platform
with runs N/e/x/t/ /li/n/e/ /h/e/re. cargo xtask ci: all 10 steps passed.
2026-10-23 09:22:20 +07:00
BFlat 5c3db3cef8 Merge pull request #3740 from dotCooCoo/feat/place-off-ui-thread
Place: files are read and decoded on a background thread
2026-10-23 09:09:05 +07:00
BFlat 8922fa8362 Merge pull request #3741 from lehni/feature/otsvg
Type: OpenType SVG colour fonts draw and export as vector art
2026-10-23 09:08:48 +07:00
dotCooCoo 5fe4f3ead1 Place: files are read and decoded on a background thread
Squashed from #3740 onto main.
2026-10-23 09:07:55 +07:00
Jürg Lehni c28ad99678 Type: OpenType SVG colour fonts draw and export as vector art
Each glyph's SVG document is read by the SVG importer, which the engine registers with the text crate.
2026-10-23 09:07:54 +07:00
BFlat a947b29637 Merge pull request #3745 from storytold/land/3363
G12: Constrain Angle for the arrow keys, Shift drags and new objects (#394)
2026-10-23 08:55:32 +07:00