Commit Graph
7190 Commits
Author SHA1 Message Date
BFlat c86bb07a44 Merge pull request #8854 from dotCooCoo/fix/confined-single-pdf-test-artboards
Tests: a confined single-file PDF of several artboards checks every artboard it carries
2026-11-21 10:34:16 +07:00
BFlat e8b23c5ba9 Merge pull request #8852 from dotCooCoo/fix/mesh-picks-survive-tool-switch
Mesh: picked points stay picked between the mesh-point tools
2026-11-21 10:33:52 +07: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 e2d62de4fe Merge main into feat/distorted-image-commands 2026-11-20 18:54:01 -08:00
dotCooCoo f6593b16dc Properties: the Profile row stays while another selected stroke has a variable width 2026-11-20 18:50:11 -08:00
dotCooCoo 71d747946b Merge main into fix/flare-lone-x2-y2-error 2026-11-20 18:23:24 -08:00
dotCooCoo 2adc433f5e Plug-ins: the plug-ins folder can't block startup on a special file
A folder load checked each .wasm path and then opened it with a blocking
open. When a named pipe replaced the file between the two, the open held
the load until something wrote to the pipe, and with it startup or a
prefs.set of the folder. On Unix the file is now opened
without waiting and without making a terminal the controlling terminal,
and the opened file is checked again: anything that is not a regular file,
or is over the module limit, is refused and listed in the folder report.

A folder load still reads at most 1,000 .wasm files, the first by file
name, and now holds only those paths while it lists the folder. The
files past the first 1,000 were dropped and not reported; plugin.reload
and plugin.list now return their count as leftOut. An error while the
folder is listed fails the load, as an error opening the folder does,
instead of dropping the entries after it.
2026-11-20 17:28:22 -08:00
Dylan M. TayloranddotCooCoo 82d5aabeec refactor(cdr): use shared craft-cdr from craft-libs (#8857)
* refactor(cdr): depend on shared craft-cdr from craft-libs (#1665)

Replaces the local crates/cdr (vectorcraft-cdr) crate with craft-cdr
from storytold/craft-libs#2697 (storytold/craft-libs#778), keeping
VectorCraft's document/artboard/layer/shape mapping in crates/engine.

Co-authored-by: dotCooCoo <RobertLeeLW@gmail.com>

* build(cdr): pin craft-cdr to craft-libs main (75d179f8df)

* build(cdr): pin craft-cdr to craft-libs main (9b28b56bc7)

* docs(cdr): point CDR/CMX provenance and test paths to craft-cdr

---------

Co-authored-by: dotCooCoo <RobertLeeLW@gmail.com>
2026-11-20 20:27:55 -05:00
dotCooCoo 4df95ec51f Flare: a lone x2 or y2 in shape.flare is an error
shape.flare took the rings' end point only when both x2 and y2 were
numbers. Given one of them alone, it dropped it and placed the end point
from pathLength and direction instead. It now refuses the call with
"missing number `y2`" (or `x2`), as shape.editFlare already does, draws
nothing and adds no undo step. With neither, or both null, pathLength
and direction still place the end point.

Saved flare settings that hold only one of x2 and y2 are no longer read
as an editable flare; the group stays as art.

Docs: params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-20 17:06:34 -08:00
dotCooCoo 91e2551f47 Kinsoku sets: tests for pasted type and shaped lines under a custom set
Pasted type whose custom set was edited after the copy is checked against
a fresh layout by its line ends, which move from A to B while the line
count stays the same, so the test fails without the relayout in Relink.

The every-line composer's first-word measure is checked in a frame whose
top is narrower than the word the custom set's Cannot End Line makes, so
the test fails when that measure uses the built-in setting instead.
2026-11-20 16:38:04 -08:00
dotCooCoo 5721f96931 Expand Appearance: Safe Mode checks symbol art that a group's raster effect draws
A plain symbol instance does not expand on its own, so the Safe Mode
plug-in check skipped its symbol's art. When a group or layer around the
instance has a raster effect (its own, or on one of its fills or
strokes), the group's image draws that art, plug-in effect included, and
Expand Appearance committed pixels without the plug-in effect instead of
returning the Safe Mode error. The check now looks into every object of
such a group or layer, symbol art included.
2026-11-20 16:14:07 -08:00
dotCooCoo 830cf56430 Save for Web: Save Color Table and Load Color Table write and read .act files
The color table's menu gains Save Color Table… and Load Color Table…,
as the help page describes
(https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=404).

- document.exportForWeb.saveColorTable writes the GIF or PNG-8 table the
  preview shows as a color table file in the published layout
  (https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/): 256
  RGB entries in file order, zero-padded, then the color count and the
  transparent index, two bytes each, big-endian (65535 for none). It
  always writes 772 bytes and writes shifted colors as written.
- webExport.loadColorTable reads the 768-byte and 772-byte forms and
  returns the settings with the file's colors, other than the transparent
  entry, as the fixed Custom palette and Colors set to the file's count.
  The table's other edits and its sort are cleared and Web Snap is set
  to 0, so the loaded colors are written as they are. It reads at most
  773 bytes, rejects other sizes, counts of 0 or above 256, both or
  neither of path and dataBase64, and JPEG or PNG-24, and remembers
  nothing. Load Color Table… is disabled on the web.
- document.exportForWeb.preview rejects a slice that is not a whole
  number from 1 up instead of ignoring it.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-20 15:38:27 -08:00
dotCooCoo 14e22a1dff Mesh: a Lasso click that deselects also unpicks the mesh points
A plain Lasso click away from the art deselects everything but kept the
mesh points the tool held, so the Mesh tool chosen next showed the
deselected points as picked, nudged them with the arrow keys and
recolored them with a fill color. The click now unpicks them. Shift and
Alt clicks still change nothing.

docs/target-app-parity.md also lists the Eyedropper among the tools that
keep the picks, and docs/mcp.md describes the Lasso click.

Test: a_lasso_click_that_deselects_unpicks_the_mesh_points in
crates/engine/src/tests/mesh_picks.rs.
2026-11-20 15:28:27 -08:00
dotCooCoo a82de18956 Symbols: in Draw Behind a placed instance goes directly below the selection
symbol.place, symbol.placeFromDocument and symbol.addFromLibrary with
`place` now read the drawing mode: in Draw Behind the new instance goes
directly below the selected object, or at the bottom of the current
layer when nothing is selected, as the help page describes for placing
symbols
(https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/learn-drawing-basics/drawing-modes-overview.html).
Place Symbol Instance in the Symbols panel and a symbol dragged onto
the canvas from the Symbols panel or a symbol library all go through
these commands.

VectorCraft's own rules: with several objects selected the instance
goes below the bottommost one, a selected path in a compound path puts
it beside the compound path, and a clipping path stays at the bottom of
its clip group or clipping layer. Draw Normal and Draw Inside keep the
instance on top of the current layer, and a locked or hidden layer
still refuses it with no edit.
2026-11-20 15:14:53 -08:00
dotCooCoo 0a33781158 Links: the Unembed code comment names TIFF among the stored formats
An image that keeps CMYK inks is stored as TIFF, and Unembed writes it as a .tif file when the path has no extension. The comment above the format choice now lists TIFF with PNG, JPEG, GIF and WebP.
2026-11-20 15:02:06 -08:00
dotCooCoo 073a654e6a Packaging Tools: list Set Fold Angle's angle with the angles that are not turns
The turn-direction test asks every angle param to say whether it turns
clockwise or counter-clockwise. A fold angle folds a panel out of the
page; the command's description says a positive angle folds it away
from the printed side and a negative one toward it. The test now lists
the param with the other angles that are not turns.
2026-11-20 14:46:11 -08:00
dotCooCoo a04159b287 Graphic Styles: Redefine Graphic Style keeps the own style of a path inside a series group linked to the target
graphicStyle.redefine passed the redefined style to every path directly in a
graph series group linked to it, and to every line and label of a linked Axes
or Legend group, so a member linked to another style (the `from` style or a
third one) was restyled and relinked to the target. Such a member now keeps
its look and its link, in the `from` and the object forms; unlinked members
and members still linked to the target follow as before. The group is still
cleared and unlinked, and one undo takes it all back.
2026-11-20 14:39:10 -08:00
dotCooCoo 7048d47a0a Merge main into feat/retype-installed-fonts 2026-11-20 14:36:46 -08:00
dotCooCoo 3023335b59 Mesh: picked points stay picked between the mesh-point tools
Gradient mesh points picked with the Mesh tool, Direct Selection, the
Lasso or the Polygonal Lasso now stay picked when another of these tools
is chosen, and when one of them lends Direct Selection for a Cmd/Ctrl
click, so a fill color chosen afterwards recolors just those points.
Before, only a switch to or from the Eyedropper kept them. Any other
tool, Group Selection included, drops them.

Session::switch_tool, lend_selection_tool and give_back_tool share one
test of which tools pick mesh points. Giving the tool back leaves the
lender's picks alone when they did not change, so the Mesh tool keeps
the point whose handles it shows.

Tests: crates/engine/src/tests/mesh_picks.rs.
Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-20 14:14:48 -08:00
dotCooCoo 4df75635da Tests: a confined single-file PDF of several artboards checks every artboard it carries
A single-file PDF with Preserve Editing of an artboard range carries the
whole document, so a confined export of it checks the links on every
chosen artboard. The new test exports artboards 1-2 as one PDF, then
places an image linked outside the read roots on the second artboard
only and checks that the export is refused without writing its folder.
It also checks that assets.export refuses pdfs `single`, the source
that pdfs `single` does not accept.
2026-11-20 14:14:26 -08:00
ruchirguitar 6bca6cb51e Variables panel: add row context menu 2026-11-21 00:18:56 +05:30
adambelis 82c3c38ecc Merge remote-tracking branch 'origin/main' into fix/width-profile-shape
# Conflicts:
#	docs/target-app-parity.md
2026-11-20 18:19:32 +01:00
adambelis d4e4888ef4 Width profiles: keep the profile's shape and smooth its outline (#3145)
Sample a profile until the straight line between samples stays within the
outline tolerance, in points, and fit the sampled edges at that same
tolerance. A profiled outline now covers the same area as the shape before
the smoothing (star with Wave: 15597.7 pt² against 15595.4 pt² on the same
fixture), while staying G1 cubics rather than one cubic per flatten step.

Profile interpolation again takes each run's own secant slope at its ends,
so a preset draws the shape it drew before the smoothing work.
2026-11-20 18:15:25 +01:00
bflatastic e1aa78590a Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/target-app-parity.md
2026-11-20 23:41:24 +07:00
dotCooCoo 05c8c7df95 Quick Pen: a length drag that keeps the length records no undo step
A drag across a line's length handle leaves the line's length as it
was. It started an interaction and previewed the path anyway, so letting
go recorded an undo step for an unchanged path. The drag now previews
nothing until the length changes.
2026-11-20 07:55:55 -08:00
dotCooCoo 6c1eb02a57 Circle: From Center tests compare against the Circle Tool Options defaults
The two Circle From Center tests in the engine's tool settings compared the
tool's options with {"fromCenter": ...} alone. Since the Circle tool also
reports the Circle Tool Options (center, radii, diameter, color,
standardAnchors and dragThird), the tests take the options the tool starts
with and check that only fromCenter changes.
2026-11-20 07:06:06 -08:00
dotCooCoo 562bc30860 Merge main into fix/live-paint-contents-group-targets 2026-11-20 06:45:10 -08:00
dotCooCoo f9c00a5ae5 Live Paint: graphic styles on a group's contents give fills to its faces and strokes to its edges
Follows #8765. graphicStyle.apply with target "contents" gave every face
and edge of a Live Paint group the whole style, so faces drew the style's
strokes along their outlines and edges drew its fills. Each face now takes
only the style's fills and each edge only its strokes, with or without
add, and neither is linked to the style. An add that gives a face or edge
nothing leaves it and its link as they are, and an apply that changes
nothing records no undo step.

appearance.clear on the contents leaves a face one empty fill and an edge
one empty stroke, and appearance.reduceToBasic keeps only a face's fill
and only an edge's stroke.

Docs: docs/mcp.md, params text, docs/target-app-parity.md.
2026-11-20 06:26:51 -08:00
BFlat 3f7620e00b test: compare the cut tests' documents without their creation stamps (#8836) 2026-11-20 21:11:52 +07:00
dotCooCoo 3e4e4e255f Merge main into feat/retype-near-matches 2026-11-20 06:02:09 -08:00
dotCooCoo 816c2ad521 Merge main into feat/retype-installed-fonts 2026-11-20 05:54:27 -08:00
dotCooCoo 9e1f6ca09b Merge main into fix/retype-drawn-shape-font-state 2026-11-20 05:51:10 -08:00
dotCooCoo 049dd3f050 Merge main into feat/quick-pen-edit-delete 2026-11-20 05:47:02 -08:00
dotCooCoo 3581f6e3c3 Merge main into fix/live-paint-bucket-journal-replay 2026-11-20 05:43:52 -08:00
dotCooCoo c5959c36ae Retype: glyphs that fit several fonts equally often take the font they fit closest in all
Each shape votes for every face it fits, and each glyph is set in the face
with the most votes. When faces tied, each glyph took its own closest face,
so one line could be set in several fonts. With Noto Sans CJK SC loaded,
simplified Source Sans 3 outlines of "Tim" fit both faces (and Noto Sans
Hebrew) three times each: T and m took Source Sans 3 and i took Noto Sans
CJK SC, so T and m were left as lone outlines.

A tie now goes to the face with the least leftover distance summed over the
shapes that fit it, so every glyph that fits that face takes it.
2026-11-20 05:43:25 -08:00
dotCooCoo 869d645b3b Merge main into fix/retype-remeasure-budget 2026-11-20 05:43:18 -08:00
dotCooCoo a7ab3b782e Merge main into feat/fogra51-52-cmyk-v2 2026-11-20 05:42:42 -08:00
dotCooCoo 3d652613c9 Merge main into feat/quick-pen-length-handles 2026-11-20 05:40:04 -08:00
dotCooCoo 4875606bb7 Live Corners: a Corners link opens the corner settings of the picked corners
The Control bar and the Properties panel show a Corners link beside the
radius field of the picked corners. It opens a pop-up with the corner
kind, the radius (blank while the picked corners differ) and Relative or
Absolute rounding. Each change sets the picked corners of every selected
path in one object.setLiveShape call with items, one undo step: the
corners holding a Direct-Selected anchor, or every corner of a path
selected whole. The Properties panel shows the link while a corner is
Direct-Selected; its corner rows now cover several selected paths too,
and a live rectangle or polygon selected alone, which keeps its own
radius and kind rows, shows the link for the pop-up.

object.setLiveShape with relativeRadii: true now works on a plain path
with corners: the path keeps its outline as the base of its Live
Corners. Before, it did nothing, and relativeRadii: false added an empty
undo step. A Relative path whose corners are all uncut again keeps its
rounding, and Absolute on one with no corner cut makes it a plain path
again.

With Relative rounding, a radius is now compared as the fraction it
would store, so typing the radius the field shows, or a radius past the
corner's maximum again, adds no undo step. Before, it was compared with
the radius as drawn.

Part of #1232. Reported by XTRECY-BD.
2026-11-20 04:31:00 -08:00
dotCooCoo ee464025ad Retype: grown font files and drawn glyphs count toward the search limits
- A font file that grew past the limits after the installed fonts were
  listed counts as skipped, and the bytes read from it count toward the
  2 GiB a search reads. A suitcase font's resource fork is read the same
  way, no further than one byte past the limit.
- The 500,000-glyph budget counts the glyphs an index draws (each
  matched glyph once), not the face's mapped characters.
- The Retype panel's background search hands the command the loaded
  fonts that match as well as the installed fonts it found, so a loaded
  font that matched stays listed after the fonts found are loaded.
- A shape that no glyph's key fits (more than 48 contours) no longer
  keeps type.retype reading installed files after the other shapes
  have matched.
2026-11-20 03:40:22 -08:00
dotCooCoo 5200e3c54b Retype: loaded fonts past the first 96 are compared too
Retype compares at most 96 loaded faces in one index: the document's
fonts, the fonts in `fonts` and the faces earlier searches of the
installed fonts loaded come first. Loaded faces past those 96 were never
compared, and the search of the installed fonts leaves loaded faces out,
so a shape only such a face matches stayed unmatched.

- type.retype now compares the loaded faces past the first 96, 96 at a
  time, with the shapes that are not plain and that the first 96 do not
  match, before it reads any installed file. The background search hands
  those faces to the command with what it found in the installed fonts.
- A face that another version of its family and style shadows is no
  longer compared ahead of the other loaded faces.
- A background search whose command fails before it takes what the
  search found no longer leaves it for a later command.
- With the Retype panel's list full, installed faces count as skipped
  only when a shape would start a search of the installed fonts.
- "Retype failed: internal error: its thread stopped" has a row in each
  complete catalog.

Docs: docs/mcp.md (Retype installed fonts).
2026-11-20 01:43:43 -08:00
dotCooCoo f9548440bd Retype: a translucent compound path whose glyphs overlap stays an outline
The glyphs of a split compound path can become separate type objects, for
example on two lines. A compound filled by the nonzero rule whose glyphs
overlap passed the paint check, and with an opacity below 100% the two objects
then painted the overlap twice. A split whose parts overlap now keeps the shape
an outline when the shape has an opacity below 100%, a blend mode other than
Normal, a gradient or pattern fill or a stroke.
2026-11-20 01:40:36 -08:00
dotCooCoo d1859cf03f Retype: a compound path of more than 65,536 path elements is not split into glyphs
Splitting a compound path copies its contours and compares each with the
others. A selected compound of a few contours with a very large number of path
elements was split however many elements it had. Such a shape is now matched
whole only, like one of more than 256 groups or 512 contours.
2026-11-20 00:44:37 -08:00
FredApps 3c4fb3c8fa Merge main into pencil-redraw-extend 2026-11-20 09:36:37 +01:00
dotCooCoo b237da4672 Retype: a near glyph whose size and turn would draw it past the tolerance ends the line
A near-matched glyph joins a line when its size and turn are each within the
tolerance of the line's, and the line's type then draws it at the line's size
and turn. Together with the glyph's own leftover distance, that change could
put the drawn glyph further from its shape than the tolerance: an m 4% larger
and turned 0.04 radians stayed on its line at tolerance 0.05.

The layout check now also measures, for each near-matched glyph (and each glyph
of a line whose first glyph is one), how far the change from its matched size
and turn moves the drawn outline relative to its spread, combined with its own
leftover distance, and splits the line before it when that passes the
tolerance, or when the glyph's center sits further away than its origin may.
2026-11-20 00:24:20 -08:00
dotCooCoo 00ac5d7a3f Retype: installed fonts that are not loaded yet are matched too
Shapes no loaded font matches are now compared with the installed fonts
that nothing has loaded yet. type.retype reads their files one at a time,
smallest first, until each such shape matches a font it has read, and
type.retypeFonts (the Retype panel's list) ranks the matching installed
fonts with the loaded ones, up to 96 fonts in all.

- A file is read for the search and released. A face whose glyphs match
  is loaded as it was read, without the family's other files, and later
  searches in every open document compare it ahead of the other loaded
  faces. A matching face that another version of the same family and
  style shadows is loaded and not listed.
- Files over 256 MiB, and the files and faces past 2 GiB read or 500,000
  glyphs drawn, are left out and counted in the result's
  installed.skipped.
- A plain shape (one contour of up to four straight edges, such as a
  rectangle or a hyphen) does not start the search, and matches only a
  font the other shapes found.
- installed: false turns the search off; any value other than true,
  false or null is an error. retype.find takes installed too.
- In the app, Type > Retype and Find Matching Fonts (the panel's button,
  or retype.find from a menu or the command palette) search on a thread
  of their own. After 0.4 seconds a progress window shows the files
  read, with Cancel (also Esc, retype.cancelSearch). When the search is
  done the command runs with the fonts it found, without reading the
  installed fonts again, unless the document or its selection changed
  meanwhile. Reset Retype Panel and a new search stop a panel search.
  An MCP cancel stops the search between files.

Part of #4934.
2026-11-19 23:42:54 -08:00
dotCooCoo cf80c11871 Retype: a compound tries its other complete splits when the paint check rejects the first two
A compound path whose split with the longest runs and split with the shortest
runs both failed the paint check stayed an outline, even when another complete
split (AB and CD for groups A, B, C and D) passed it. The split search now
checks the other complete splits in order, at most 32 per shape for exact
matches and 32 for near matches, and looks each run of groups up at most once,
only when the search reaches it.
2026-11-19 23:05:44 -08:00
dotCooCoo f355716ffe Retype: a mark first after a split leaves the shared measures alone
When the rest of a line after a mark that a split left first starts with
another mark, that rest is no longer measured for tracking. Its own pass
leaves the mark out and measures the glyphs after it, so the earlier
measure was thrown away but still took from the measures shared by every
line in the call. A run of marks could use them up, and a tracked line
retyped with them then lost its tracking and split glyph by glyph.
2026-11-19 22:26:27 -08:00
dotCooCoo fd33180c84 Live Corners: a Selection tool double-click on a corner widget shows the Transform panel
With the Selection tool, a double-click on a visible corner widget of a
selected live rectangle or polygon now shows and selects the Transform
panel, where the shape's corner radius fields are, as the Rectangle,
Rounded Rectangle, Ellipse, Polygon and Star tools already do. It used to
open the Corners dialog. The tool, the selection, the document and the
undo history stay as they were. Direct Selection's double-click still
opens Corners.

Docs: docs/mcp.md (Live Corners), the ui.corners params text,
docs/ui-parity.md and docs/target-app-parity.md.

Part of #1232
2026-11-19 22:17:01 -08:00
dotCooCoo 2fa3e32c83 Retype: stacked lines split from one compound path become one object
Lines that a compound path of several glyphs splits into share that
shape, so the check that one line's shape comes right after the last
line's never passed for them, and each line stayed an object of its own.
Two lines of one shape now follow each other, and the other joining
rules decide as for lines of separate shapes. The lines of the existing
paint-order test are moved farther apart so they still make two objects.
2026-11-19 21:57:11 -08:00