Commit Graph
9071 Commits
Author SHA1 Message Date
BFlat 8dab326d41 Merge pull request #6127 from dotCooCoo/fix/flatten-region-limit-early
Flattening: stop building a group's regions at the first one past the region limit
2026-11-08 14:13:55 +08:00
BFlat 1a28f998cc Merge pull request #6126 from dotCooCoo/fix/issue-6110
Fix #6110: pattern brush corner tiles line up with the side tiles
2026-11-08 14:13:44 +08:00
BFlat d7acf687e9 Merge pull request #6124 from dotCooCoo/fix/envelope-params
Envelopes: commands reject a style, orientation or preserveShape of the wrong type
2026-11-08 14:13:33 +08:00
BFlat 2c442f642c Merge pull request #6122 from dotCooCoo/feat/linesweeper-craft-libs
Build: linesweeper from craft-libs' vendored copy at 481f66d
2026-11-08 14:13:15 +08:00
BFlat 45d31fc197 Merge pull request #6120 from dotCooCoo/fix/relative-paths-nested-links
Links: links inside symbols, patterns and masks follow a moved folder and are updated like links in the layers
2026-11-08 14:13:00 +08:00
BFlat 9e8bfd87f9 Merge pull request #6119 from dotCooCoo/feat/trace-preset-buttons
Image Trace: buttons above the Preset menu choose the Auto Color, High Color, Low Color, Grayscale, Black and White and Outline presets
2026-11-08 14:12:45 +08:00
BFlat 0199dd10ca Merge pull request #6118 from dotCooCoo/feat/artboard-fade-outside
Artboard Options: Fade Region Outside Artboard darkens the area outside the artboards
2026-11-08 14:12:29 +08:00
BFlat b8884e40c4 Merge pull request #6116 from dotCooCoo/fix/type-find-params
Type: find and replace and Type menu commands reject a param of the wrong type
2026-11-08 14:12:13 +08:00
BFlat 5c4efaa515 Merge pull request #6114 from dotCooCoo/fix/ai-legacy-rksj-text
.ai import: legacy type in CJK fonts decodes by the font's CMap
2026-11-08 14:11:58 +08:00
BFlat e0f2c98e1f Merge pull request #6108 from dotCooCoo/feat/recent-colors-30
Color: Recent Colors keeps the last 30 colors used, across documents
2026-11-08 14:11:43 +08:00
BFlat 57c7fc24ee Merge pull request #6090 from dotCooCoo/feat/control-bar-dock
Control bar: the panel menu and the gripper dock it to the top or the bottom of the window
2026-11-08 14:11:27 +08:00
dotCooCoo 96252edb74 Flattening: stop building a group's regions at the first one past the region limit
With an unclipped raster/vector balance between 0 and 100, a group that
splits into more than 10^(balance/20) regions is rasterized whole and
none of its regions are used. The region build now stops at the first
region past that limit (pathops `regions_within`) instead of building
every region and then discarding them. Groups at or under the limit,
and every group with Clip Complex Regions on, still build every region.

Flatten Transparency, the flattened document and EPS export come out
the same as with every region built, for groups under the limit, at it,
just over it and far over it.
2026-11-08 12:47:59 +07:00
dotCooCoo 5ccb73c6bb Fix #6110: pattern brush corner tiles line up with the side tiles
A corner tile was turned so that its x axis followed the mean of the
directions the path arrives and leaves in. A tile drawn as a right-angle
corner then came out turned 45° at every corner, so a rectangle drew its
corners as diagonal chevrons.

Outer and inner corner art are now both read as the corner that joins a
side tile on its right to one below it, as in the help's steps for
making corner tiles. Each corner tile is turned so that those two arms
meet the sides: on a rectangle the tile is square to the side tiles and
turns 90° from one corner to the next, and at other angles it is turned
halfway between the two sides. The arms follow Flip Along and Flip
Across, and a corner that takes the other kind's art turns it the same
way. Which art each corner takes is unchanged.

The PatternBrush field docs, the brush.options params text, docs/mcp.md
and the progress doc describe how corner art is drawn.
2026-11-08 12:47:59 +07:00
dotCooCoo 4fddf66d2c Envelopes: commands reject a style, orientation or preserveShape of the wrong type
object.envelope.makeWithWarp, resetWithWarp and options read `style`
and `orientation`, and options read `preserveShape`, as text and
ignored any other value, so `{"style": 5}` kept the default style and
`{"orientation": "diagonal"}` kept the current orientation. They now
return "`style` must be a string" or "`preserveShape` must be a
string" for a value other than text or null, and "`orientation` must
be one of horizontal, vertical" for any other orientation, through
the shared `choice` helper. object.envelope.options checks the warp
keys whatever is selected, so a call with no envelope or only mesh
envelopes selected gets the same errors, an unknown style name
included. Omitted and null values keep today's defaults.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-08 12:47:59 +07:00
dotCooCoo f416fc49ef Build: linesweeper from craft-libs' vendored copy at 481f66d
The workspace patches linesweeper to storytold/craft-libs at 481f66d, the
merge of craft-libs#633, which keeps the crates.io 0.5.0 package in
vendor/linesweeper. Fixes made to that copy reach VectorCraft when the
rev moves. Cargo.toml still asks for linesweeper 0.5.

The library is unchanged: Cargo.toml and every file under src/ in the
copy are byte-identical to the crates.io 0.5.0 package, whose sha256 is
a25df1b0c5432893f41bba817150e323703ee5f6d974f3a6808ac7fd7f046d18, the
checksum Cargo.lock carried. Cargo.lock changes only linesweeper's
source and checksum lines.

NOTICE no longer lists linesweeper among the crates fetched through
crates.io, and names the craft-libs revision it comes from.
2026-11-08 12:47:58 +07:00
dotCooCoo 98731894ec Links: a nested link follows its moved file whatever else its link holds
On open, a link found away from its path was passed to the same file's links in symbols, graph designs, patterns and opacity masks only when the nested link equaled the layers' link field for field. A nested link without a relative path, as documents saved before kept them, then kept the old path. The new path now goes to every nested object that shows the same file and content.
2026-11-08 12:47:58 +07:00
dotCooCoo 729d8d5184 Links: Update Links reads files again for links inside symbols, patterns and masks
Update Links, and opening a document with Update Links: Automatically,
now read a modified file again for the images and placed documents in
symbols, graph designs, patterns and opacity masks that show the same
content as the objects read in the layers. By default Update Links also
reads the files that only that art shows. Each nested object takes the
file's place as its own Placement Options say, including the clip, and
its link takes the new path, size, modification time and hash.

Saving a document also refreshes the placed copies of it inside symbols,
graph designs, patterns and opacity masks of the other open documents,
not only those in the layers.

Relink, Embed and Unembed still change only the objects they are given.
2026-11-08 12:47:57 +07:00
dotCooCoo acb6b880d5 Links: links inside symbols, patterns and masks are saved with relative paths
A save wrote the path relative to the document only for linked images and
placed documents in the layers. Links inside symbols, graph designs,
patterns and opacity masks kept only their absolute path, so after the
document and its files moved to another folder together, those files were
not found.

- The save sets the relative path of every link the document holds.
- On open, a link inside that art whose file was found away from its path
  takes the new path, as a link in the layers does, so the next save
  writes the right relative path.
- Document::update_links_where changes only the links it picks and copies
  only the nodes on the way to them.

Docs: docs/mcp.md (Linked images), docs/target-app-parity.md.
2026-11-08 12:47:57 +07:00
dotCooCoo 8d3a64453a Image Trace: buttons above the Preset menu choose the Auto Color, High Color, Low Color, Grayscale, Black and White and Outline presets
Six buttons above the Image Trace panel's Preset dropdown choose a preset as the dropdown does:
Auto Color chooses Auto Color, High Color chooses High Fidelity Photo, Low Color chooses Low
Fidelity Photo, Grayscale chooses Shades of Gray, Black and White chooses Black and White Logo,
and Outline chooses Outline. With Preview on, a click traces the selected Image Trace object again
as one undo step; with nothing traced selected, it changes the panel's settings only. The button of
the panel's preset shows as selected, and its tooltip names the preset.

The help page lists these options before Preset:
https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/image-trace-panel-options.html
Which preset each button chooses is VectorCraft's own.

High Color and Low Color get rows in every catalog.
2026-11-08 12:47:56 +07:00
dotCooCoo 12da9ef677 Artboard Options: the fade covers the box around crossing artboards when they would leave too many rectangles 2026-11-08 12:47:55 +07:00
dotCooCoo cdf42d5ab5 Docs: Fade Region Outside Artboard lines name Presentation Mode and the new tests 2026-11-08 12:47:55 +07:00
dotCooCoo 92d3505529 Artboard Options: Presentation Mode draws no fade, and the fade's rectangles stay few for many artboards
The fade outside the artboards is no longer drawn in Presentation Mode, which shows only the art, even when the Artboard tool is active.

The rectangles that make up the fade are now merged down from band to band when a gap keeps the same left and right edges, and the bands are swept with the boards sorted by their top edge. A row of 200 top-aligned artboards of different heights now gives at most 600 rectangles instead of about 20,000.
2026-11-08 12:47:55 +07:00
dotCooCoo e620da7ed6 Artboard Options: the fade covers art outside the artboards and OK sets the Global checkboxes after the artboard
With Fade Region Outside Artboard on, the canvas now draws the fade over the
art as well as the pasteboard: one mesh of black at 40% opacity covers the
canvas outside the artboards, so the pasteboard and any art on it show each
channel at 60% of its value, and art inside an artboard is unchanged. It
replaces the darker pasteboard fill.

Artboard Options sets the Global checkboxes' preferences only after
artboard.setProps or artboard.new succeeds. When the artboard command
refuses a value, the preferences stay as they were and the dialog stays
open. A Global value that is not true or false is refused before anything
changes.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-08 12:47:54 +07:00
dotCooCoo e5ddabf51f Type: find and replace and Type menu commands reject a param of the wrong type
Find and Replace, Find Next, Change Case, Smart Punctuation, Insert
Character and Type on a Path Options read their params with helpers that
fell back to the default for a value of the wrong type: Find and Replace
with `replace: 5` replaced every match with nothing, and `flip: "true"`
did not flip. They now return an error and leave the document, the
selection and the undo history unchanged:

- `find`, `replace`, `case`, `char`, `text`, `unicode`, `effect` and
  `alignToPath` must be a string or null.
- `matchCase`, `wholeWord`, `dashes`, `ellipsis`, `quotes` and `flip`
  must be true, false or null.
- Smart Punctuation's `scope` must be `selection` or `document`.
- Type on a Path Options' `spacing` must be a number or null.
- Insert Character's `code` must be a whole number or null.
- Find and Replace's `ids` must be a list of existing object ids.

Insert Character checks `char`, `text`, `code` and `unicode` before it
picks one, so `{"char":"bullet","unicode":176}` is refused too. The
order the sources are used in is unchanged. Null counts as left out, so
`type.insert {code: null, unicode}` inserts the Unicode character.
Omitted params keep their defaults.
2026-11-08 12:47:53 +07:00
dotCooCoo 1063f5090a Artboard Options: Fade Region Outside Artboard darkens the pasteboard while the Artboard tool is active
Artboard Options gets a Global group with Fade Region Outside Artboard and
Update While Dragging. Both are application preferences
(fadeRegionOutsideArtboard, artboardUpdateWhileDragging), on by default and
also listed under Preferences > General > Artboard Options.

While the Artboard tool is active, the canvas draws the pasteboard with each
color channel at 60% of its value. With Update While Dragging off, the
pasteboard draws as usual while the tool moves or resizes an artboard and
darker again when the drag ends. Exports and print do not change.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-08 12:47:53 +07:00
dotCooCoo 81a7a68388 .ai import: legacy type in CJK fonts decodes by the font's CMap
Legacy type in a composite font such as HeiseiMin-W3-83pv-RKSJ-H was
decoded one byte to a character, so Japanese, Chinese and Korean type
opened as unrelated single-byte characters, and the font name kept the
CMap.

Tf now finds a predefined CMap at the end of the font name, unless a TZ
gives the font encoding pairs, and the font is the name without it.
Strings in that font are read by the CMap's code space, mapped to CIDs
with the predefined CMaps craft-pdf carries, then to Unicode by the
character collection's CID-to-Unicode CMap. Codes the CMap doesn't map
are dropped. A -V CMap is read with its -H form's codes. Codes in the
Unicode CMaps (UCS2, UTF8, UTF16, UTF32) are read as Unicode; those
helpers follow mockydevs' #6067. A 0x0D byte ends a paragraph and a 0x09
byte is a tab in these fonts too.

The predefined CMaps craft-pdf doesn't carry (RKSJ, 78-RKSJ, 78ms-RKSJ,
78-EUC, 78, Add, Ext, NWP, GB, CNS1, KSC, B5 and the Hong Kong B5 sets
other than HKscs-B5) are read with the nearest
carried CMap, which can give a different character for some codes.
GBT, GBT-EUC, GBTpc-EUC, CNS2 and KSC-Johab type still decodes byte by
byte, with the CMap removed from the font name.

Docs: docs/file-format-parity.md.
2026-11-08 12:47:52 +07:00
dotCooCoo c32f44ba3a Color: Recent Colors keeps the last 30 colors used, across documents
Recent Colors now keeps up to 30 solid colors instead of 10, newest
first and each once; applying a 31st drops the oldest. The Session
holds the list, so it stays the same when another document is opened
or made active, and it lasts for the session.

The Color and Swatches panels wrap the chips onto further rows when
the panel is too narrow for one row, so every color can be clicked.
A list that fits one row draws as before.

Docs: paint.recent params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-08 12:47:51 +07:00
dotCooCoo 19fd8d1d5e Control bar: the panel menu and the gripper dock it to the top or the bottom of the window
Squashed from #6090 onto main.
2026-11-08 12:47:51 +07:00
BFlat 704efb045c Merge pull request #6103 from dotCooCoo/fix/svg-missing-links-key
SVG import: each linked file keeps image keys of its own
2026-11-08 13:40:29 +08:00
BFlat fc8e3c538d Merge pull request #6102 from dotCooCoo/fix/huge-selection-brackets-test
Tests: huge-selection vertex counts leave out the art's raster
2026-11-08 13:40:15 +08:00
BFlat 9c3491a5be Merge pull request #6097 from dotCooCoo/fix/outline-low-path
Path ops: stroke outlining and unions sweep long, low paths along their length
2026-11-08 13:40:00 +08:00
BFlat a17bea9a8f Merge pull request #6095 from dotCooCoo/fix/reset-bounding-box-group-members
Object: Reset Bounding Box also squares the objects inside the selection
2026-11-08 13:39:45 +08:00
BFlat 449425e200 Merge pull request #6092 from dotCooCoo/fix/fill-changed-part
Canvas: moving anchors of a long path redraws only around them
2026-11-08 13:39:35 +08:00
BFlat c6025d74b9 Merge pull request #6091 from dotCooCoo/fix/ai-pdf-later-page-artboard
.ai import: type on a later page of a PDF of some artboards goes to its artboard
2026-11-08 13:39:20 +08:00
BFlat 6711bb1b70 Merge pull request #6088 from dotCooCoo/feat/prefs-search
Preferences: a search field finds a setting and goes to its category
2026-11-08 13:39:05 +08:00
BFlat 584a1665da Merge pull request #6087 from dotCooCoo/fix/shortcuts-path-param
Shortcuts: export, import, set, list and preset reject a param of the wrong type
2026-11-08 13:38:48 +08:00
BFlat 05aab8b437 Merge pull request #6086 from dotCooCoo/feat/snap-to-last-location
Smart Guides: Snap to Last Location puts a moved selection back where it began
2026-11-08 13:38:33 +08:00
BFlat 2f49bb6aa2 Merge pull request #6082 from dotCooCoo/fix/style-face-once
Type: layout looks up each style run's face once
2026-11-08 13:38:17 +08:00
BFlat b1f6203509 Merge pull request #6081 from dotCooCoo/fix/tr-unquoted-keys
i18n: error messages keep the keys and values they name without backticks
2026-11-08 13:38:02 +08:00
BFlat 91437c2091 Merge pull request #6080 from dotCooCoo/feat/ctrl-enter-ends-text-edit
Type: Cmd+Enter (Ctrl+Enter) ends text editing and keeps the text
2026-11-08 13:37:47 +08:00
BFlat 2c95bc9b87 Merge pull request #6079 from dotCooCoo/fix/issue-5816
Fix #5816: CJK and other fallback faces in the interface sit on the Latin baseline
2026-11-08 13:37:32 +08:00
BFlat d17dd59247 Merge pull request #6076 from dotCooCoo/feat/symbol-reset-transformation
Symbols: Reset Transformation returns an instance to its symbol's scale, rotation and shear
2026-11-08 13:37:16 +08:00
BFlat 263ddbea00 Merge pull request #6075 from dotCooCoo/fix/more-tests-without-time-limits
Tests: the CSS, glow and .ai Zstandard guards count work instead of timing it
2026-11-08 13:37:00 +08:00
BFlat e9271a7a00 Merge pull request #6074 from dotCooCoo/feat/history-new-document
History: the New Document button makes a document from the selected state
2026-11-08 13:36:45 +08:00
BFlat 70427de13d Merge pull request #6073 from dotCooCoo/fix/group-drag-outline
Selection: a group dragged with Real-time Drawing off shows each member's outline
2026-11-08 13:36:29 +08:00
dotCooCoo e29e01b650 SVG import: each linked file keeps image keys of its own
Images were keyed by their bytes alone, so two <image> elements that
link different files with the same bytes shared one image key. Every
missing file shows the same placeholder, and files can also be copies
of each other. Export reads a linked file's pixels into the image key
when the document holds only a preview, so once one of the files was
found or changed, the images of the other file exported and printed
that file's pixels.

A linked image's key now also holds a hash of its link's path, as the
.ai reader's linked images do. Images of one file still share a key.
The missing-file placeholder comes from
vectorcraft_doc::links::missing_placeholder instead of a copy in the
SVG importer.
2026-11-08 12:23:53 +07:00
dotCooCoo 7b8fccf785 Tests: huge-selection vertex counts leave out the art's raster
The huge type-on-a-path selection test compares the canvas mesh drawn with
the Rectangle tool against the one drawn with the Selection tool. When the
render worker's frame lands between the two (a slow first frame under heavy
load), the art's textured quad shows in only one of them, and the test
counted its 4 vertices as brackets.

canvas_vertices and frame_vertices now skip the mesh drawn with the canvas
art texture, so the counts hold only what the overlays draw. A huge
selection of type, images, symbols or meshes used the same comparison.
2026-11-08 12:23:52 +07:00
dotCooCoo 8a7011a9d3 Path ops: stroke outlining and unions sweep long, low paths along their length
The overlap sweep moves a horizontal line down the page, and its time
per event grows with the number of segments on that line. A long, low
path, such as rows of a zigzag, puts a whole row on the line at once.

stroke_region, unite_all_with and try_unite_all_with now estimate how
many segments the sweep holds at once in each direction, from up to
4,096 segment boxes (one from each run of segments, at a position that
changes from run to run). When the estimate for the input turned a
quarter turn is under two thirds of the upright one (2,048 segments or
more), the operation runs on the turned input and the result is turned
back. A quarter turn swaps and negates coordinates, so no point moves
by rounding. Offset Path is not turned. Callers of unite_all,
try_unite_all and outline_stroke take the turned sweep through these
functions.

Tidy's lookups of the input curves around a piece and of the kept
anchors can search along y: once lookups with more than 64 candidates
along x have scanned 16 per item, a lookup sorts the list along y once
and uses that window when it holds fewer candidates (under a quarter as
many for curves). Where the y window rarely helps, only one lookup in
32 measures it. is_kept counts the few points within its tolerance
directly instead of searching for the window's end.

In the sweep_axis tests, a turned result has as many subpaths as the
result without the turn, and the area where the two differ is no
larger than the refit precision times the outline's length.

On one open path of 200,000 anchors in rows of 1,000, Outline Stroke
takes 17.3 s of processor time instead of 31.3 s and Unite 2.9 s
instead of 6.5 s in a release build. Unite of 2,000 circles takes the
same time as before.
2026-11-08 12:22:04 +07:00
dotCooCoo d495b4a378 Object: Reset Bounding Box also squares the objects inside the selection
Reset Bounding Box set the angle to 0 on the selected objects only. A
rotation changes the box angle of the selected objects and of every
object inside them, so the members of a rotated group kept their angle:
after rotating two rectangles 20 degrees, grouping them, rotating the
group 10 degrees and resetting, Ungroup brought back a box at 30
degrees, and a second reset reported 2 objects to change.

The command now also squares every object inside the selected ones: the
children of groups, compound paths, clip groups, blends, envelopes,
repeats and intertwines, and the art of linked opacity masks. The art of
an unlinked mask does not turn with the object, so it keeps its angle.
Ungroup, Release Clipping Mask, Release Compound Path, Blend Expand,
Release Envelope, Release Repeat, Release Intertwine and Release Opacity
Mask then bring back boxes square to the page. The whole reset stays one
undo step.

Two results change. `changed` counts every object reset, the objects
inside included, so the steps above return 3 where they returned 1. A
group whose own box is square but whose members are turned used to
return 0 with no undo step; it now squares the members in one step.

Docs: params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-08 12:22:01 +07:00
dotCooCoo 4fefdaf95a Canvas: moving anchors of a long path redraws only around them
When only anchors of a path or compound path move, the area an edit
changed is now the box of the segments that start or end at a moved
anchor (and the line that closes an open subpath's fill at a moved
end), before and after, grown by the farthest the strokes reach. The
canvas then draws that part of the frame again instead of the whole
object. Objects with a non-solid paint, dashes, a width profile,
arrowheads, a brush, effects or an opacity mask still count whole.

At 1600 x 1200, single-threaded, the frame after one anchor of a filled
closed path moves takes 16.6 million CPU cycles instead of 56.4 million
with 50,000 anchors, and 65.6 million instead of 180.0 million with
200,000 anchors.
2026-11-08 12:21:58 +07:00