Commit Graph
225 Commits
Author SHA1 Message Date
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
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
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 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 05d5befece Symbols: Direct Selection follows a nested instance of a clip group moved by the instance's fill effects
A symbol instance nested in a dynamic symbol's art was picked and outlined
where its art is drawn only when the shapes its fill and stroke paint were
non-empty. Those shapes leave out clip groups and type, so a nested
instance whose art is a clip group was picked at its plain place although
the canvas draws its members moved by the outer instance's fill or stroke
effects.

The test is now whether the nested instance's active fill or stroke has a
visible geometry effect, which the engine registers with
set_instance_reshapes. Picks and outlines no longer evaluate those shapes
for each nested instance they visit.
2026-11-21 04:09:01 -08:00
dotCooCoo d8db9eda83 Symbols: Direct Selection picks a dynamic instance's part where its fill and stroke effects draw it
A geometry effect on a dynamic symbol instance's fill or stroke moves or
reshapes the art the canvas draws, and a click there already selects the
instance. Direct Selection still picked a part of the art at its plain
shape and outlined that shape, so a click on the drawn result picked
nothing and a click where the part no longer paints picked it.

symbol_part_at and symbol_part_outline_in_view now test and outline the
instance's art with the effects of its active fill and stroke added, as
the canvas adds them. Live objects in the art keep their place, so the
child-index path still leads to the part. A nested instance is picked
and outlined where its reshaped art is drawn, type with a fill or stroke
of its own where its reshaped glyphs are drawn (Type Object Selection by
Path Only still takes the type path), and an image's outline includes
the shapes its own fills and strokes paint. A clipping path is still
picked and outlined by its own geometry. Outline view and layers with
Preview off keep the plain shapes; blends, envelopes and repeats in the
art are picked without the instance's effects.
2026-11-21 02:42:10 -08:00
dotCooCoo 318d1ed6e2 Selection: an Alt-drag copy in Draw Behind goes directly below its original
In Draw Behind, an Alt-drag of whole objects with the Selection or Direct
Selection tool now puts each copy directly below its own original, in the
original's group or layer, and selects the copies, as the drawing modes help
page lists duplicating by Alt-drag among the actions Draw Behind applies to
(https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/learn-drawing-basics/drawing-modes-overview.html).
The copy of a clip group's or clipping layer's clipping path goes directly
above it, so the clipping path stays the bottom object.

- object.transform takes drawBehind (with copy); the tools send it while Alt
  is held. A value that is not true or false is refused.
- Draw Normal, Draw Inside, object.move, the transform dialogs' Copy,
  Duplicate and Transform Again keep putting copies above.
- Document::insert_below puts nodes directly below their anchors in one pass.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-20 19:19:13 -08:00
dotCooCoo e0629ad03a Live Paint: canceling keeps the defaults a defaultsOnly preview began with
With New Art Has Basic Appearance off and an object selected, canceling an
interaction that had previewed a command with defaultsOnly: true replaced
the restored defaults with the selection's appearance. Cancel now skips
the new-art inheritance for such an interaction.
2026-11-19 19:08:53 -08:00
dotCooCoo c609eb49af Live Paint: canceling restores the defaults after a later ordinary preview
An interaction that previewed a command with defaultsOnly: true keeps
putting the defaults it began with back on every later preview and on
cancel, also when the latest preview gives no defaultsOnly. docs/mcp.md
says that library.use keeps item as the library item.
2026-11-19 17:59:44 -08:00
dotCooCoo 426ea94268 Live Paint: bucket paint commands replay from the journal with any tool
While the Live Paint Bucket is active, a paint or stroke command that names
no objects changes only the colors the bucket paints with. The journal
recorded the params as given, and the active tool is not journaled, so a
replay with the Selection tool active painted the selection instead.

The paint and stroke commands now take defaultsOnly: true, which keeps a
command without ids, id or item to the defaults with any tool active. When
the bucket routed a command, its journal entry notes defaultsOnly: true,
also when the params gave false. library.use (a color, gradient or pattern)
and swatch.library.add with apply note it too and pass it to the commands
they run.

- defaultsOnly is a bool. It is refused with ids, id or item, and in
  stroke.setAdvanced with brush.
- With New Art Has Basic Appearance off, new-art inheritance does not
  replace the defaults after such a command, unless a later step of a batch
  selects another first object or changes its appearance.
- A preview with defaultsOnly: true, and the one after it, starts from the
  defaults the interaction began with, and a cancel puts them back.
- paint.sampleColor with a stop and defaultsOnly reads the default's
  gradient.

Test: live_paint_bucket_commands_replay_from_the_journal_with_another_tool
(engine). Docs: docs/mcp.md, the Live Paint Bucket paragraph; params text
of each command.
2026-11-19 16:35:59 -08:00
BFlat 190375c76c Merge pull request #7760 from dotCooCoo/feat/graph-designs-from-other-document
Graphs: graph designs come in from another document
2026-11-20 05:44:33 +07:00
BFlat 134e3defa6 Merge pull request #7021 from dotCooCoo/feat/3d-custom-bevels
3D: Extrude & Bevel takes custom bevel shapes drawn as open paths
2026-11-20 04:08:29 +07:00
dotCooCoo 7b222bbd57 Merge main into feat/graph-designs-from-other-document 2026-11-19 12:22:10 -08:00
BFlat f43f27658b Merge pull request #8759 from dotCooCoo/fix/live-paint-bucket-eyedropper-stop
Live Paint: the bucket keeps its colors through the stop eyedropper and a Cmd-click
2026-11-20 02:30:58 +07:00
dotCooCoo 856e61afb4 Merge main into feat/3d-custom-bevels 2026-11-19 11:13:58 -08:00
dotCooCoo b585b75109 Live Paint: the bucket keeps its colors through the stop eyedropper and a Cmd-click
The proxies and the paint commands that name no objects stood for the Live
Paint Bucket's colors only while the bucket itself was the active tool. Two
tools that work for the bucket lost them:

- The Gradient panel's eyedropper on a stop of the bucket's gradient: the
  stop was deselected as soon as the Eyedropper became active, and the click
  then copied the clicked object's appearance onto the selection.
- A Cmd-click with the bucket, which the Selection tool takes: with New Art
  Has Basic Appearance off, the new selection's appearance replaced the
  bucket's fill and stroke.

Session::bucket_paints() now answers for the bucket, the Eyedropper armed
for a stop of its gradient (Tool::returns_to), the Selection tool lent to
either, and the actions of the Eyedropper's click that end by switching back
to the bucket. Every check that compared the tool id with the bucket's now
uses it: the proxies, the Stroke panel, the selected stop's owner, new-art
inheritance, previews and their cancel.

- The armed pick ends without sampling, and switches back to the bucket,
  when its stop is no longer selected or no longer exists.
- Clicking the panel's eyedropper again while a pick is armed keeps the tool
  the pick returns to.
- The Color panel's cached mixed state is keyed on bucket_paints().
- A Brush Options Key Color pick or an Image Trace ignored-color pick armed
  from the bucket is not a stop pick.

Tests: live_paint_bucket_keeps_its_colors_through_the_stop_eyedropper_and_a_cmd_click
(engine), the stop option test (tools), the stop eyedropper and mixed
selection tests (ui-egui). Docs: docs/mcp.md, the Live Paint Bucket
paragraph.
2026-11-19 10:05:22 -08:00
BFlat b902c33e0c Merge pull request #8706 from dotCooCoo/fix/setoption-survives-dropped-press
Tools: an option set during a press survives the press being dropped
2026-11-20 01:01:44 +07:00
dotCooCoo 42d22b6cc6 Merge main into feat/graph-designs-from-other-document
# Conflicts:
#	crates/engine/src/cmd/clipboard/resources.rs
2026-11-19 06:48:38 -08:00
dotCooCoo 54a964d4fa Tools: an option set during a press survives the press being dropped
A dropped press puts back the persistent options the tool had when the
press began. It also put back an option set while the press was held
(tool.setOption or the desktop app's setter), and the next store of the
tool's options wrote the old value over the new one. A General > Corner
Radius change during a Rounded Rectangle press was undone the same way.

- Setting an option of the tool that took the press updates the press's
  saved options with every option the set changed, so the dropped press
  keeps them.
- Setting an option stores all of the tool's options, the drag's changes
  included, so a dropped press after such a set stores the options it
  puts back.
- A Corner Radius change updates the held Rounded Rectangle press's
  saved radius.
- Both hold when the tool lent a selection tool for the press (a
  Cmd-drag).
2026-11-19 05:21:36 -08:00
dotCooCoo 3fb77f58bb Merge main into feat/3d-custom-bevels 2026-11-19 04:54:39 -08:00
dotCooCoo 5d8609e881 Merge main into feat/proof-setup-save-load
# Conflicts:
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n/tests.rs
2026-11-19 04:47:38 -08:00
BFlat cb094669ae Merge pull request #8628 from dotCooCoo/fix/live-paint-bucket-fill-color
Live Paint: a color chosen with the Live Paint Bucket is the color it paints with
2026-11-19 15:06:53 +07:00
dotCooCoo db1442db8a Merge main into feat/3d-custom-bevels 2026-11-18 23:53:53 -08:00
dotCooCoo 2b0d6e5b14 Live Paint: bucket previews, gradient stops and presets use the bucket's colors
While the Live Paint Bucket is the active tool:
- each preview in one interaction starts from the colors the
  interaction began with, so previewing paint.swap twice and committing
  swaps once;
- a gradient stop selected on the selection's gradient is not selected,
  and one selected on the bucket's gradient is not selected after
  another tool is chosen;
- gradient.selectStop selects a stop of the bucket's gradient even
  with an object of a symbol instance picked;
- gradient.presets.apply picks the fill or stroke by the active proxy,
  not by the selection's active Appearance row;
- stroke.set and stroke.setAdvanced no longer read the selection's
  Appearance row;
- the Stroke panel's Align Stroke buttons are on, as with nothing
  selected, matching stroke.set, which takes every alignment.

The params text of paint.sampleColor, gradient.presets.apply,
stroke.set, stroke.weightUp and stroke.setAdvanced, the set_paint note
and the Live Paint paragraph of docs/mcp.md now describe this, and say
that the bucket takes only the color and weight of the stroke for new
art.
2026-11-18 18:44:05 -08:00
dotCooCoo 2eeb582f35 Merge main into feat/proof-setup-save-load 2026-11-18 17:16:14 -08:00
dotCooCoo 0705716dc9 Live Paint: a color chosen with the Live Paint Bucket is the color it paints with
With a Live Paint group selected and the Live Paint Bucket active,
choosing a fill color (a swatch, the Color Picker, the Fill box) painted
the whole selection, so every face and edge of the group took one color
before the bucket painted anything.

While the bucket is the active tool and no ids, id or item are given:
- paint.setFill, paint.setStroke, paint.none, paint.lastColor,
  paint.lastGradient, paint.editGradient, paint.invert,
  paint.complement, paint.swap and paint.default change only the
  defaults, the colors the bucket paints with, and record no undo step;
- stroke.set, stroke.weightUp, stroke.weightDown and stroke.setAdvanced
  (without a brush) change only the stroke for new art;
- the Fill and Stroke proxies, the Stroke panel and its Profile list
  follow those defaults, as they do with nothing selected;
- New Art Has Basic Appearance off no longer copies the selection's
  appearance into them after a command;
- canceling a Color Picker preview puts the bucket's color back.
2026-11-18 15:56:14 -08:00
dotCooCoo 70c0f533f6 Transform: Show on Shape Creation counts shapes drawn in perspective
With the perspective grid shown and a plane active, a Rectangle,
Ellipse, Polygon, Star or Line Segment drag is journaled as
perspective.draw naming the shape command. note_shape_drawn now counts
that entry, alone or as a batch step, so the Transform panel opens for
a shape drawn on the plane too. perspective.draw naming another shape
(a flare, for example) still does not count.

The Transform tests now move a selected rectangle and check that the
move succeeded before checking that the panel stays closed, and check
that the frames after a shape draw the panel's controls, with a control
run where the option is off.
2026-11-18 14:27:27 -08:00
dotCooCoo 877ecb27f1 Merge main into feat/graph-designs-from-other-document 2026-11-18 13:11:26 -08:00
dotCooCoo 80cc17da48 Merge main into feat/transform-show-on-shape-creation 2026-11-18 13:09:50 -08:00
BFlat 5537e02cb0 Merge pull request #8403 from dotCooCoo/feat/toast-messages
Messages: app.toast shows a message over the window without stopping work
2026-11-19 00:41:29 +07:00
dotCooCoo a6d6ff667d Merge main into feat/transform-show-on-shape-creation 2026-11-18 07:28:28 -08:00
dotCooCoo fac3cb8013 Shapes: a batch step that switches tools keeps the batch's earlier steps
A batch run during a widget drag settles the drag first. A tool or
document switch inside the batch then ended the drag with a Cancel,
which undid the batch's open interaction and its earlier steps in that
document. Deactivating a tool in a batch now leaves the Cancel out, for
the blend, corner, pie and side widgets alike.
2026-11-18 02:00:11 -08:00
dotCooCoo 2123b284f0 Merge main into feat/proof-setup-save-load 2026-11-18 01:42:49 -08:00
dotCooCoo cd5d611196 Merge main into feat/toast-messages 2026-11-18 01:21:20 -08:00
BFlat 8c80810f2a Merge pull request #8050 from dotCooCoo/feat/interpolate-control-points
Direct Selection: optional preference interpolates curve handles when an anchor moves
2026-11-18 13:12:30 +07:00
BFlat facb326b16 Merge pull request #8377 from dotCooCoo/perf/inline-refresh-changed-subtrees
Type: inline graphics are checked again only in the layer trees an edit changed
2026-11-18 12:57:22 +07:00
dotCooCoo d42995dcff Merge main into feat/proof-setup-save-load 2026-11-17 20:26:07 -08:00
dotCooCoo 44bd7ba6df Merge main into feat/toast-messages 2026-11-17 19:59:56 -08:00
BFlat 12ab63aedd Merge pull request #7137 from dotCooCoo/feat/script-file-folder-write
Scripts: File and Folder objects write files inside a script's scope, with per-script grants and pickers
2026-11-18 10:25:30 +07:00
BFlat 7e6a42abef Merge pull request #7543 from dotCooCoo/fix/dialogs-keep-preview-warning
Type: typing kept when a dialog or a panel previews keeps its warning and selection
2026-11-18 10:11:54 +07:00
dotCooCoo 24e0208d31 Type: inline graphics are checked again only in the layer trees an edit changed
After an edit of a document with symbols, the refresh of inline graphics
walked every node of every layer. It now keeps the document the last
refresh left resolved, with the symbol bounds it measured, and checks
only the layer trees that are not the same nodes as that document's,
as long as the symbols, graph designs, pattern tiles and foreign data
(which holds the symbols' natural sizes and 9-slice guides) are the
same and each measured symbol still measures the same. Otherwise the
full pass runs, as before. Visit order is unchanged, so the document
and the ids of the texts laid out again equal the full pass's.
2026-11-17 10:08:24 -08:00
dotCooCoo 386b2e9d30 Merge main into feat/graph-designs-from-other-document 2026-11-17 08:41:51 -08:00
dotCooCoo 04c65a85af Messages: app.toast shows a message over the window without stopping work
`app.toast {message, level?, seconds?}` queues a short message that the
desktop app shows at the window's bottom right. It closes after its time
(4 seconds by default, 0.5 to 60) or when clicked. At most 5 show at
once, the newest lowest; a message shows at most 6 lines with the whole
text on hover, and a stack taller than the window scrolls. `level`
(info, success, warning, error) sets the color of its edge.

Scripts raise one with `vc.run`, MCP clients and plug-ins through the
command, and an action records it as a step. The app's own code calls
`Session::toast`. The command edits no document and adds no undo step;
invalid values are errors. Part of #7523: the tick sound is not
included.

Docs: docs/mcp.md, the Automation evidence in docs/target-app-parity.md.
2026-11-17 08:30:51 -08:00
dotCooCoo ad0675d4f9 Transform panel: Show on Shape Creation shows the panel after a shape is drawn
The Transform panel menu has a Show on Shape Creation check item, the
`showOnShapeCreation` preference (off until chosen, kept with the
preferences). With it on, the app shows the Transform panel, as Window >
Transform shows it, after a shape is drawn: a drag or OK in the dialog of
the Rectangle, Rounded Rectangle, Ellipse, Polygon, Star or Line Segment
tool, a shape the Shaper tool recognizes, or a shape.rectangle,
shape.ellipse, shape.polygon, shape.star or shape.line command, alone or
as a batch step. A panel that is showing already stays as it is. A
canceled drag or dialog, a failed command, saved steps an action plays, a
script's commands and Presentation Mode leave the panels as they are.

The engine notes a drawn shape where it journals the command
(`Session::take_shape_drawn`), and the app checks it once per frame.

Help page: https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/transform-panel-overview.html
2026-11-16 08:16:11 -08:00
dotCooCooandbentschener 49a9a0f4cb Direct Selection: optional preference interpolates curve handles when an anchor moves
The new General preference Interpolate Control Points When Moving
Anchors (`interpolateControlPoints`, off by default) is the default of a
new `interpolate` param of path.moveAnchors (a Direct Selection drag),
object.nudge (the arrow keys), object.move, object.transform and
object.transformAgain. With it on, a move of direct-selected anchors
re-maps both handles of each segment with one moved end by the turn,
uniform scale and move that take the segment's old ends to its new
ends, so a segment between two corner anchors keeps its shape relative
to its ends.

- A segment with both ends moved, or with its ends at the same place
  before or after the move, moves as it does with the preference off.
  Only an exact move re-maps handles; any other transform of the anchors
  is applied as before.
- A smooth anchor keeps its handles in line: its re-mapped handle takes
  the new length and stays in line with the other handle, and when both
  of its handles were re-mapped they point along the mean of their
  directions. When the two point the same way, both move with the
  anchor as with the preference off.
- The value used joins the command's journal entry and Transform
  Again's options, so a replay or a repeat re-maps the handles alike
  whatever the preference is then. A non-boolean value is an error.
- A retracted handle stays retracted, each drag or nudge is one undo
  step, and a nudge of 0 still records none. Align and Distribute, and
  the anchors of type paths and area type frames, move as before.

With the preference off, moves give the same result as before. The
label has a row in every catalog. The hook in transform_anchors follows
the patch bentschener attached to #7832; the handle math differs.

Fixes #7832

Docs: docs/mcp.md, docs/target-app-parity.md.

Co-authored-by: bentschener <353895224+bentschener@users.noreply.github.com>
2026-11-15 22:26:18 -08:00
dotCooCoo aa1653690e Merge main into feat/script-file-folder-write 2026-11-15 20:02:53 -08:00
dotCooCoo 62204d9897 Merge main into feat/3d-custom-bevels 2026-11-15 19:52:16 -08:00
BFlat 783f09d3b2 Merge pull request #8004 from dotCooCoo/fix/hit-test-follows-geometry-effects
Selection: clicks and marquees follow an object's own geometry effects
2026-11-16 09:31:55 +07:00
dotCooCoo 3c73995861 Merge main into feat/script-file-folder-write 2026-11-15 16:06:24 -08:00