Commit Graph
273 Commits
Author SHA1 Message Date
BFlat 023843e3a6 Merge pull request #9114 from dotCooCoo/feat/scripts-startup-scripts
Scripts: run startup scripts at launch and before a chosen script
2026-11-27 05:13:16 +07:00
BFlat df909b69e0 Merge pull request #8984 from dotCooCoo/fix/feather-effect-history-name
History: effect steps take the effect's name from the Effect menu
2026-11-27 05:12:25 +07:00
BFlat a431537d95 Merge pull request #8823 from dotCooCoo/feat/retype-installed-fonts
Retype: installed fonts that are not loaded yet are matched too
2026-11-27 05:09:16 +07:00
dotCooCoo 7da21d015c Validate and retain chosen scripts before startup runs 2026-11-26 08:56:39 -08:00
dotCooCoo e015b20396 Merge main into feat/scripts-startup-scripts 2026-11-26 07:31:10 -08:00
dotCooCoo 3055ea5757 Merge main into feat/scripts-startup-scripts 2026-11-25 23:39:37 -08:00
dotCooCoo 478ed51ace Merge main into feat/retype-installed-fonts 2026-11-25 18:40:00 -08:00
dotCooCoo b6b702f080 Merge main into fix/reset-preferences-interface-settings 2026-11-25 18:36:58 -08:00
BFlat daccee9065 Merge pull request #9100 from dotCooCoo/fix/shape-builder-color-pick
Shape Builder: a fill chosen while the tool is active leaves the selection's fills
2026-11-26 08:48:05 +07:00
dotCooCoo bf782369fc Merge main into feat/retype-installed-fonts 2026-11-25 15:23:05 -08:00
dotCooCoo c64d194a4d Merge main into fix/pathfinder-effect-options-followup 2026-11-25 14:43:59 -08:00
dotCooCoo 916ea13906 Merge main into fix/reset-preferences-interface-settings 2026-11-25 10:07:37 -08:00
dotCooCoo 9e3b3efed0 Merge main into fix/shape-builder-color-pick 2026-11-25 09:45:57 -08:00
dotCooCoo 754512b617 Merge main into fix/feather-effect-history-name 2026-11-25 09:40:01 -08:00
dotCooCoo f906a0f814 Merge main into feat/scripts-startup-scripts 2026-11-25 09:16:13 -08:00
BFlat 62eff34cc6 Merge pull request #9069 from dotCooCoo/feat/plugins-load-on-workers
Plug-ins: stored and folder plug-ins load on worker threads while the window shows
2026-11-25 19:32:48 +07:00
dotCooCoo 98605b8651 Merge main into fix/feather-effect-history-name 2026-11-25 04:24:09 -08:00
BFlat 3dd6257d16 Merge pull request #9143 from dotCooCoo/fix/command-during-interaction
Undo: a command run during a tool drag is its own undo step
2026-11-25 15:57:51 +07:00
dotCooCoo 9d225ba091 Merge main into feat/plugins-load-on-workers
The Safe Mode choice after a stopped launch moves to main's dialog host and keeps listing every
plug-in that was loading: one name in the sentence, or the list with "Disable Listed Plug-ins and
Continue". Automation requests wait in the queue while plug-ins load, and one past its deadline is
answered as expired. File > Open and opening a file still wait for the plug-ins still loading.
2026-11-24 23:31:07 -08:00
dotCooCoo c1859a1f1e Undo: an anchor drag ends when a command renumbers its path
A command run during a Direct Selection drag of anchors or segments, such as
Add Anchor Point or Reverse Path Direction, can number the path's anchors
anew. The drag kept its old anchor numbers and then moved a different point.
When the command changes a path that holds the drag's selected anchors or
segments in more than a move of the whole path, the drag now ends without a
step of its own, and the command's edit stays. A command that only moves the
path leaves the drag going on the same anchor.
2026-11-24 20:22:27 -08:00
dotCooCoo 0a36ef97e1 Merge main into fix/ctrl-lends-selection-tool 2026-11-24 18:02:30 -08:00
dotCooCoo 3ad7a77378 Merge main into feat/retype-installed-fonts 2026-11-24 15:24:41 -08:00
dotCooCoo 7a85e09b26 Merge main into feat/retype-installed-fonts 2026-11-24 15:21:47 -08:00
dotCooCoo ea602fcd00 Undo: Find Objects with select during a drag is a step of its own
document.find with `select: true` is journaled, so during a tool drag it
now runs outside the drag like other journaled commands. It finds and
selects only objects outside the drag's preview, as its replay before
the drag does.
2026-11-24 13:54:07 -08:00
dotCooCoo 7a37e282d9 Undo: putting back a drag's paints names every PaintDefaults field
put_back_interaction compares the new-art paints field by field. It now
destructures PaintDefaults without `..`, so a field added to the struct
does not compile until it is handled there.
2026-11-24 12:50:43 -08:00
dotCooCoo 06b483320e Merge main into fix/command-during-interaction 2026-11-24 10:12:16 -08:00
.CooCoo 4c60269d1a Select: adding objects one at a time checks and reads only the added ones (#9145) 2026-11-25 00:55:44 +07:00
dotCooCoo 782715d467 Undo: a drag after a command replays on its own objects
When a command run during a tool drag deletes, hides or locks an object
that the drag's preview names in its ids, the preview applied again
leaves that object out, so the drag still edits the others. A preview
left naming no object records no step.

When the command changes the selection, the journal also records the
drag's own selection after the command (select.set, with its anchors,
segments, guides and key, or its slices, target, symbol part or Objects
on Path member), so replaying the journal moves the objects the drag
moved. A targeted object keeps its guides and key, and a path with
every anchor selected keeps them selected as anchors. The current layer
and the highlighted Layers panel rows are left as the drag left them.
2026-11-24 09:52:58 -08:00
BFlat 1bd8c8cb6e Merge pull request #8987 from dotCooCoo/fix/script-export-linked-files
Scripts: vc.run export of an open document reads its own linked files
2026-11-24 16:04:43 +07:00
BFlat 2ef89d479e Merge pull request #8798 from dotCooCoo/fix/live-paint-bucket-journal-replay
Live Paint: bucket paint commands replay from the journal with any tool
2026-11-24 16:01:02 +07:00
BFlat 6f37bd839c VectorCraft on the craft UI framework (#8800)
VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.

About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.

Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
2026-11-24 08:25:24 +07:00
dotCooCoo 26d2a08fe3 Merge main into fix/script-export-linked-files 2026-11-22 23:41:56 -08:00
dotCooCoo 6e713caf33 Merge main into feat/retype-installed-fonts 2026-11-22 23:39:38 -08:00
dotCooCoo 9562ed9b04 Preferences: Reset Preferences resets Smart Guides, Snap to Grid and the Contextual Task Bar
The Preferences dialog shows Smart Guides, Snap to Grid and General's Enable
Contextual Task Bar, but the app keeps them with the interface state, and
Reset Preferences left them as they were. Confirming Reset Preferences now
puts their defaults in the dialog with the other defaults: Smart Guides on,
Snap to Grid off, and the task bar as the current workspace was saved. OK
applies them and Cancel keeps the values in use. On a touch screen, where
the reset turns Enable Touch Workspace back on, OK sets the task bar in the
workspace it leaves, and the Touch workspace keeps its own.

prefs.reset (the Command Palette's Reset Preferences), alone or as a
command.batch step, resets them too, each only when it resets every category
or the setting's own (Smart Guides, Guides & Grid, General). With every
category or File Handling it also clears the app chosen for Edit Original, as
the dialog's reset does. The engine records the categories it reset
(Session::take_prefs_resets), and the app resets its own settings from them
after each command, each frame, and before a touch screen switches to the
Touch workspace.

A category that is not a string is now an error instead of a reset of every
category.
2026-11-22 16:56:25 -08:00
dotCooCoo ece910a3b7 Selection: a Cmd double-click after switching back is the active tool's
A switch from the Selection tool to another tool and back kept the
record of the selection tool Cmd lent the last press, so the Cmd
double-click that followed still went to Direct Selection. The record is
now cleared whenever the active tool changes and whenever the tool
starts afresh (a switch to another document or another view of it).
2026-11-22 16:45:24 -08:00
5af36bae87 Fix #4568: PDF import keeps embedded fonts for text whose family isn't installed (#4569)
* PDF import: keep embedded fonts for text whose family isn't installed

Glyphs drawn in an embedded font whose family isn't available are gathered
during import and built into one small TrueType font per family and style,
kept with the document (font/ttf blob). Text objects record the fonts and a
hash of their text: layout and rendering draw them in the kept font until the
text is edited (undo restores it) or the family is installed. Lines are
spaced against the file's own widths with per-glyph placement (#3756).

* PDF import: satisfy crate layering constraints without format dev-dep

* FileFont: negate us_win_descent in i32 to prevent overflow on extreme negative descenders

* PDF import: a kept font carries the file font's licence flags, and the docs say what that means

Review of #4569: the fsType of the file's font is copied to the font built from its glyphs (a test pins it against Embedding), so exports honour it; the docs state the limits, that the file's font program is not parsed, and that a saved file carries third-party glyphs.

* PDF import: a glyph curve far outside any glyph is left out; docs say what the limits and the font program mean

CodeRabbit on #4569: coordinates beyond 1e6 font units are refused before the curve is subdivided. The docs say the 64-font limit is what draws one type object and that the file's font program is read only for its licence flags and metrics.

* PDF import: two programs of one font keep the stricter licence flags; the docs cite their sources

CodeRabbit on #4569: embedded programs of one family and style share one built font, which kept the first program's fsType; it now takes the stricter of the two, whichever came first. The docs entry cites the Acrobat Help pages and the OpenType fsType specification.

* fmt

* PDF import: embedded fonts are on by default, with an opt-out preference

Owner decision on #4568. Preferences > File Handling > Use fonts embedded in imported PDFs (pdfImportEmbeddedFonts, on by default) and the embeddedFonts param of document.open and file.place: off, a PDF's type in a font the machine lacks is set in the fallback font with the missing-font warning, as before. One test each for on and off, one for the preference reaching the options.

* fmt after merging main

* docs: restore the status lines damaged by merges (main's line plus this PR's note)

* PDF import: set embedded_fonts through a builder method (keeps read_opened under the complexity limit)

* PDF import: move the missing-font notes out of read_opened (complexity limit after the merge)

* #4569: isolate file-font resources and reclaim live faces (UNVERIFIED)

* Preserve carried-font ownership across placement and recovery

* Fix carried-font regression test dependencies and unwind probe

* Use explicit OS2 heights in owned-font reference regression

* Keep native font regression artwork inside document layers

* fix(engine): bind file fonts when reading document profiles

* test(engine): initialize file-font leases in new image fixtures

* test: complete file-font lease initialization in image fixtures

* docs: keep the #4568 entry in the file-format parity status line

* fix(pdf): keep a line with another glyph for the same character as outlines (review)

A font kept with the document has one glyph per character. A glyph of the file's font that
differs from the one already kept for its character (a stylistic alternate that maps to the same
Unicode scalar) marks its line, which is imported as outlines so each glyph draws as the file
does.

* docs: resolve the leftover status-line conflict

* Placed document blob: give the new ImageBlob literal its file_font

* Test: a PDF's two glyphs for one character survive a native save and reopen as the file draws them

* Test: move the native save and reopen half of the two-glyphs regression to the engine (layers: no format dev-dep in pdf)

* Fix embedded-font preference help and English fallback checks

* Format embedded-font preference help with the workspace edition

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: skylartaylor <hi@skylar.cc>
2026-11-22 18:18:18 -06:00
dotCooCoo 828f43447d Undo: a command run during a tool drag is its own undo step
A command run from a panel, a menu or an automation client while a tool
drag was open ran inside the drag. With Real-time Drawing on, the drag's
next move put the document back to where the drag began and dropped the
command's edit, and Escape dropped it too. With Real-time Drawing off,
the release lost what the drag drew or moved.

Such a command now runs on the document without the drag's preview and
records its own undo step and journal entry. The drag then continues
from the command's result: with Real-time Drawing on, its preview is
applied again at once. The release records the drag's step after the
command's, Undo takes back the drag first and the command next, and
Escape cancels only the drag. The drag acts on the objects it started
with, so a selection the command makes does not change what it moves,
and the fill and stroke proxies keep showing those objects' paints.
Objects the command deletes, hides or locks are left out of the drag.
A change the command makes to the current layer or to the new-art paints
stays when the drag ends or is canceled. When the command deletes the
art being dragged, the drag records no step. A warning or an error from
the preview applied again goes to the command's result.

Commands that already kept the drag as a step first still do (Undo,
Redo, command.batch, swatch.renameGroup, edit.newDocumentFromState and
the others that call settle_interaction). Typing in progress is still
kept as a step of its own first. A command run during a Quick Pen press,
object.transform with copy during an Alt-drag, and a command run during
a dialog's or a panel's preview still run inside the interaction.

Docs: docs/mcp.md (undo / redo row), docs/target-app-parity.md.
2026-11-22 15:17:12 -08:00
dotCooCoo 63143460eb Pathfinder: effects journal every option they use, and Outline follows Precision
- effect.apply with some Pathfinder Options in params journals all three
  options the effect used. The journal entry used to keep only the ones
  given, so a replay took the others from the preferences at that time.
  The journal now merges an object a command resolved with the object
  the call gave, key by key.
- A Pathfinder effect's stored precision that is not a number (true,
  false, "1abc") evaluates and scales as the 0.01 pt default. It used
  to read true as 1 pt, false as the 0.001 pt bound and "1abc" as 1 pt.
  Commands still refuse such a value with an error.
- Outline, the panel operation and the effect, applies Precision. Its
  tolerance for crossings that count as one point, and for coincident
  edges, is multiplied by precision / 0.01, so the default leaves the
  output unchanged.
- Pathfinder Options' precision range is the Pathfinder effects' range
  constant rather than a copy of it.

Docs: params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-22 08:32:24 -08:00
dotCooCoo 909c169afe Scripts: queued startup runs keep the file access scope of the request that queued them
In the app, script.startup.run starts only the first queued run inside the request; the later
startup scripts and the chosen script start from the frame loop. Each of them now starts, and its
file is read, in the scope captured when the queue was built, so a confined request's automation
roots apply to every run it queued.
2026-11-22 08:06:13 -08:00
dotCooCoo a1bd1ba906 Shape Builder: a fill chosen while the tool is active leaves the selection's fills
Choosing a fill while the Shape Builder was active (a swatch, the Color
panel, the Fill box or a paint command) ran paint.setFill on every
selected path, so all of them took the color. With Pick Color From set
to Color Swatches the tool merges with the current fill, so the pick is
the color for the next merge.

While the Shape Builder is active, a fill chosen without ids, id or item
now changes only the current fill, with either Pick Color From: with
Color Swatches the next merge fills with it, and with Artwork merges
still take their look from the art. A stroke chosen then still goes to
the selection. Swap Fill and Stroke and Default Fill and Stroke change
only the paint for new art, and Swap gives the current fill the stroke
the Stroke proxy shows. This is VectorCraft's own rule; no default
setting changes.

- painting_tool_of says which tool paints with the chosen fill or
  stroke: the Live Paint Bucket with both, the Shape Builder with the
  fill. Session::tool_paints(stroke) replaces bucket_paints, so the
  paint and gradient commands, previews, the proxies, the Stroke panel
  and the Gradient panel's eyedropper follow it for each kind.
- A new selection does not replace the tool's fill for new art, with
  New Art Has Basic Appearance on or off, and new art is not linked to
  a graphic style whose fill it does not have.
- A cancel puts back a fill previewed for the tool, also after another
  tool was chosen during the drag.
- An Eyedropper pick armed for a stop of the tool's gradient samples
  only into a stop of that gradient, and ends once that stop is gone.
  Choosing another tool drops the stop the pick was armed for, and a
  pick armed while the Eyedropper waits for a Cmd-drag keeps its stop.
- The paint.freeform commands refuse the Shape Builder's fill as they
  refuse the Live Paint Bucket's colors, which lie on no object. For
  the gradient either tool paints with, the Color panel, the Gradient
  panel, the stop popover and swatch drops edit its stops instead of
  points, and the Gradient panel shows its Draw toggle, ramp and stop
  fields in place of the point controls. paint.editGradient keeps the
  given stops of a freeform gradient that has no points yet.
- A gradient command that names no kind edits the proxy in front when
  the tool paints with it, else the kind the selection's active
  Appearance row stands for.
- set_paint lists the commands that painted no object in unpainted.
- Params text and docs/mcp.md describe the rule.

Help (Pick Color From, Color Swatches):
https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/shape-builder-tool-options.html
https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=266
https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=267
2026-11-22 06:01:44 -08:00
dotCooCoo c85f3ebb5a Scripts: keep a stopped startup script's report and refuse a chosen script that cannot start
- A chosen script that script.run would refuse (a missing file, one larger
  than 8 MiB, bad parameters) ends script.startup.run with script.run's
  error before any startup script runs.
- When a queued run ends, the next one starts at the following pump, so
  the ended run's report stays for the status bar. The queue counts as a
  running script, so other runs and edits stay refused in that gap, and
  Stop asked for in it stops the run that starts next.
- Queued runs that could not start show in the status bar in the same
  frame, and the reply's failed list is not shown there again.
2026-11-22 05:48:51 -08:00
dotCooCoo d397f4232c Merge main into feat/scripts-startup-scripts 2026-11-21 22:52:51 -08:00
dotCooCoo 14b2ec5bbf Merge main into feat/retype-installed-fonts 2026-11-21 21:18:21 -08:00
dotCooCoo dc9a724b6a Merge main into fix/script-export-linked-files 2026-11-21 21:04:37 -08:00
BFlat 90cd5eef57 Merge pull request #9016 from dotCooCoo/fix/dynamic-symbol-part-selection-paint
Symbols: Direct Selection picks a dynamic instance's part where its fill and stroke effects draw it
2026-11-22 11:38:33 +07:00
dotCooCoo 7dfc281205 Merge main into feat/scripts-startup-scripts 2026-11-21 20:25:05 -08:00
dotCooCoo 27011606a5 Scripts: run startup scripts at launch and before a chosen script
With Preferences > General > Run Startup Scripts on (off by default), the
.jsx files of the Startup Scripts folder next to the preferences run when
VectorCraft starts and before each script chosen from File > Scripts,
installed or Other Script..., one at a time and sorted by name without
regard to case. Each runs with the limits of any script and its own undo
step; one that cannot be read, is too large or fails is named in the
Script Console and the status bar, and the next one runs, then the chosen
script. Nothing runs in Safe Mode; after a launch that stopped, they run
once Disable and Continue or Start Normally is chosen, and the launch
marker names the running startup script so a stop there offers to disable
it. script.startup.run runs the folder; script.* is refused inside
scripts, so a startup script cannot start another round.
2026-11-21 20:20:34 -08:00
dotCooCoo 3a9c3a763f Merge main into fix/live-paint-bucket-journal-replay
# Conflicts:
#	crates/engine/src/cmd/library.rs
#	crates/engine/src/cmd/swatchlib.rs
#	crates/engine/src/cmd/xform.rs
2026-11-21 20:12:17 -08:00
dotCooCoo 1b29256601 Plug-ins: stored and folder plug-ins load on worker threads while the window shows
At launch the desktop app loaded every stored plug-in and every module in
the Additional Plug-ins Folder on the UI thread before the window
appeared, one after the other. A slow or panicking module held up or
ended startup.

- crates/plugins/src/loader.rs (new): `Loads` runs load jobs on up to
  four threads. Each job runs inside `catch_unwind`; a panic or a load
  that takes 10 s or longer fails that job alone, and the others go on.
  Outcomes come back in job order.
- registry::FolderLoad and store::StoredLoad list in one step, load on
  the workers and install in file-name order. A module whose id was
  installed or removed in another window while it loaded is skipped.
- The desktop app loads in the background only during launch; frames
  install the finished loads. Plug-in commands, commands that edit,
  exports, control requests and files opened at launch wait for the
  loads first; view commands and queries do not.
- The launch marker names every plug-in still loading, not only the
  oldest. After a launch that stopped during the loads, the Safe Mode
  choice lists all of them, and Disable Listed Plug-ins and Continue
  turns them all off. `plugin.safeMode` adds `pendingItems`. A module
  whose load panicked is no longer named.

Docs: docs/plugins.md, docs/mcp.md.
2026-11-21 19:09:18 -08:00
dotCooCooandSofiaAFigueredo dcff4edc3d Selection: Cmd/Ctrl lends Direct Selection until it is released
With the Selection tool chosen, holding Cmd (Ctrl on Windows and Linux)
now lends Direct Selection, or Group Selection when that was chosen
last, for each press; the Selection tool is back on the release. With
Group Selection chosen, Cmd lends the Selection tool, as it already did
with Direct Selection. Selection & Anchor Display > Command Click to
Select Objects Behind keeps a Cmd press on a selected object, away from
its anchors, handles, mesh points and spine, for selecting the object
behind it. A wide stroke's painted area counts as on the object there.

- The double-click or triple-click after Cmd-clicks goes to the tool
  the clicks went to.
- Cmd pressed once a drag is under way lends nothing, and the pointer
  stays the active tool's.
- While Cmd is held, the status bar's Current Tool and the help bar
  name the lent tool, and the canvas shows the lent tool's marks and
  widgets (blend, Shaper, mirror, trace divider and repeat handles) for
  the pointer's position in the same frame.
- The help bar has hints for Group Selection.

The helper that finds a selected object's editable parts under the
pointer follows the one in pull request 6597 by SofiaAFigueredo.

Docs: docs/ui-parity.md, docs/control-protocol.md (ui.pointer).

Co-authored-by: SofiaAFigueredo <223278896+SofiaAFigueredo@users.noreply.github.com>
2026-11-21 11:55:41 -08:00