Commit Graph
7190 Commits
Author SHA1 Message Date
dotCooCoo d2fdc9728a Pen: Quick Pen marks an arc's center with a cross while the arc is drawn
Wherever the Quick Pen tool shows an arc's protractor (while the arc is
dragged, or as the piece the next click adds), it also draws a small cross at
the arc's center, as the circle and three-point arc tools draw theirs. The
cross is VectorCraft's own behavior.

Adds a test for the cross while hovering and dragging.
2026-11-21 11:19:09 -08:00
dotCooCoo 81c7578cf0 Pen: Quick Pen shows a protractor around an arc's center and snaps to its ticks
While an arc is drawn, by a drag or as the piece the next click adds, the
Quick Pen tool shows a protractor around the arc's center: a tick every 15°
from where the arc starts, a longer one every 90°, and one where it ends. The
piece the next click adds shows its protractor only while Enable Rubber Band
for the Pen tool shows that piece.

With Smart Guides on, the end of a continuous arc snaps onto the nearest tick
of its protractor, on the same circle, when the tick lies within the snapping
tolerance of the pointer, no other Smart Guide snaps the point, and neither
Snap to Grid nor Snap to Pixel snaps drawn points. A sharp-corner arc sweeps
its arc size, so its end does not snap. Shift does not constrain Quick Pen
points, so it does not change the snapping. The protractor, its 15° step and
the snapping are VectorCraft's own behavior.

The Smart Guides targets now also report whether a point landed on one of
them (`Targets::snap_hit`), so a target whose label or line is hidden still
takes precedence over a tick.

Adds tests for the arc's circle, the tick snapping by drag and by click and
its precedence, and the protractor during a drag and while hovering. Also adds
tests of existing Quick Pen behavior: a point snapping to a Smart Guide, and
the distance label shown while hovering.
2026-11-21 11:18:45 -08:00
dotCooCoo 4b97cc8492 Scripts: a failed selection restore ends the run unless the command refused
When an edit puts the selection back, the Layers panel target, symbol part,
Objects on Path member, ruler guide and key object commands fall back or
skip only when the command refuses with an ordinary error. An internal
failure or a request to stop now ends the run instead of being treated as
a refusal.
2026-11-21 11:18:44 -08:00
dotCooCoo 24c2d57b20 Plug-ins: a grant revoked without a signed grants file stays revoked
Revoking a grant while grants.json was missing, or while a file that
grants nothing (no valid MAC, too large, or not a list) was in its place
and had no entry for the plug-in, left the folder's generation as it
was. The last signed copy, still at the kept generation, then granted
the plug-in again once it was put back.

Such a revoke now raises the generation whenever the key store holds a
key. Every raise also goes past the generation the file in place
carries, so a signed write whose generation was not kept does not start
to grant when the generation catches up with it.
2026-11-21 11:09:39 -08:00
dotCooCoo 3b7c10acc4 PSD import: an adjustment layer in a nested group over drawn layers merges applied
A pass-through group's adjustment layers count as kept to change what is
below the outer pass-through group only when nothing below that group in
the outer one draws, as for adjustment layers directly in the outer group.
Before, a layer merged above them for its blend mode merged them applied
but the import counted them as not applied.

docs/mcp.md now says when a layer's mask hides all of it.
2026-11-21 10:56:48 -08:00
Mex aa860cbcfe Cover active rows on stacks of different lengths 2026-11-21 19:55:13 +01:00
Mex c854678963 Track the active object’s landing when moving one appearance row 2026-11-21 19:54:54 +01:00
dotCooCoo 626d843520 Scripts: list the object model in the host name check, refuse zOrder inside a compound path
The host name test now has rows for app, the document model classes and the enumerations the script host adds. zOrder on a path inside a compound path throws an error and leaves the document unchanged, as duplicate does.
2026-11-21 10:34:09 -08:00
dotCooCoo 540711e1a5 PSD import: masks that hide a layer's drawn pixels or a pass-through group hide all of it
A layer's mask now hides all of it when it is 0 over every pixel that isn't
fully transparent, so a shallow knockout whose mask and transparency leave
nothing drawn no longer drops the adjustment layers kept below it.

A pass-through group whose mask hides all of it no longer counts its layers
as drawing, or its adjustment layers as kept, when deciding which adjustment
layers above it change what is below the group.
2026-11-21 10:23:48 -08:00
dotCooCoo a71de2dd7a Swatch libraries: a deleted color a found tint links to keeps its name
A numbered copy of a library tint found in the document now brings
back the deleted global or spot color it links to, as a tint of the
library tint's own name does. A deleted color that the call also picks
is added before the other new swatches, so a pattern added earlier in
the call cannot give its name to another color and leave the found
tint linked to the wrong one.

A picked pattern the document already has is probed once: the probe
gives both its name in the document and the colors its art takes,
instead of a presence check, a second import into a copy and a third
presence check.
2026-11-21 10:16:36 -08:00
Mex 1c3ef4a3af Allow a linked vertex to define an angular dimension 2026-11-21 18:53:08 +01:00
dotCooCoo 6cce980e2b Scripts: keep targets and chosen parts when edits restore the selection
- An edit a script makes puts back a Layers panel target, an object
  chosen inside a dynamic symbol instance and an object chosen in an
  Objects on Path group, each with its own selection command.
- Assigning a document's selection selects a symbol instance or an
  Objects on Path group as a whole when one of its objects was chosen.
- file.newPresets lists a grid by column's rows as set, also when there
  are fewer artboards than rows, and New Document's Columns shows the
  columns those rows give the current number of artboards.
- docs/roadmap.md's M13 row names the script object model that is
  available.
2026-11-21 09:46:14 -08:00
dotCooCoo 79dd33e228 Swatch libraries: a tint whose color was deleted brings it back
A library tint or gradient counts as already in the document only when
each color it links to is there. When the document's tint of that name
links to a color the document no longer has (deleted without unlinking),
the color comes back under its own name and is listed in `added`.

A picked pattern the document already holds keeps the copy of a color
its art takes (a numbered copy the library also names), and the picked
tints and gradients of that color link to it, so adding the pattern and
the tint again adds nothing. Without such a pattern, a numbered copy the
library also names stands for that library swatch alone.

docs/mcp.md also states that a pattern pasted with Merge for some colors
and Add for others is added again as a copy.
2026-11-21 09:30:26 -08:00
dotCooCoo 22c0da7476 Plug-ins: an earlier copy of the grants file grants nothing
The key store now keeps a generation for each plug-in folder next to
the grants key, and grants.json carries its generation inside the MAC.
Every signed write puts the file at the next generation and then keeps
it; removing the file, or taking an entry out of a file VectorCraft
didn't sign, raises the generation first. A file at any other
generation grants nothing, so a signed copy put back after a grant was
revoked no longer brings the grant back, and a write whose generation
the key store couldn't keep leaves the file granting nothing. A key
store that holds a key and no generation counts as generation 0.
2026-11-21 09:28:04 -08:00
ncic 6cd0de02b1 Merge remote-tracking branch 'upstream/main' into pencil-redraw-extend
# Conflicts:
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-11-21 18:13:24 +01:00
dotCooCoo 9b6519382c PSD import: layers their masks hide draw nothing
A layer or group whose layer mask, switched on, hides all of it now counts
as drawing nothing when the import decides what an adjustment layer
changes. A layer with stored pixels is hidden when its mask is 0 over all
of them. A group, an adjustment layer and a layer that stores no pixels
are hidden only when the mask is 0 everywhere, the value outside it
included.

- An adjustment layer above such a layer or group in a pass-through group
  is kept to change what is below the group, instead of merging with
  pixels that never show.
- A shallow knockout hidden by its mask merges nothing, so the adjustment
  layers kept below it in a pass-through group stay in the group's kept
  set: an adjustment layer above that group in an outer pass-through group
  is kept after them, and both change what is below.
- A clipping base hidden by its mask draws nothing, its clipped layers
  included.

Each mask is read once for this, only when it can hide all of the layer,
and the read is not counted against the import's memory allowance, since
the mask is read and counted again where it is drawn.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-21 09:12:19 -08:00
dotCooCoo f22565d597 Merge main into feat/retype-installed-fonts 2026-11-21 08:55:26 -08:00
dotCooCoo f70d2ee7e6 Scripts: duplicate, selection and wrapper fixes for the object model
- duplicate() runs Edit > Duplicate, the place and the selection
  restore under one savepoint, so a refused place leaves the documents,
  the selection and the undo history as they were. It reads the copy's
  id from the command's own result, so ids above 2^53 return the copy.
  A path inside a compound path throws an error instead of copying the
  whole compound path.
- An edit restores a mixed selection (direct-selected anchors and whole
  objects) in its original order with one select.anchorsMany.
- Assigning the selection clears a Layers panel target.
- A call on an inactive document switches back even when the selection
  restore fails.
- documents.add with a grid by column passes the row count to file.new,
  which takes a new artboardLayout.rows key: 5 artboards in 4 rows give
  columns of 4 and 1. A preset keeps the rows until columns without
  rows, or another layout, is given, and New Document drops them when
  Columns or the layout changes.
- A held page item stays the same object when its class changes in the
  same family (a placed image that is embedded becomes a RasterItem).
- A waiting class member's answer is read as a class instance, and a
  class constructor called with new cannot wait.

Docs: docs/mcp.md (DocumentPreset, duplicate, file.new rows), docs/gaps.md
(G6).
2026-11-21 08:43:10 -08:00
dotCooCoo 7f97df87d4 Swatch libraries: library tints link only to a color of their own kind
swatch.library.add linked a library tint to the wrong color in two cases.
When the document had a process color with the same name and paint as the
tint's global color, the global color counted as already present and the
tint linked to the process color. When a tint was added without its global
color and the document had another swatch of that color's name, the tint
linked to that swatch.

- A library color counts as already in the document only when the
  document's color of that name is the same kind: process, global or spot.
  A global color whose name the document gives a process color now comes
  in under a numbered name, and its tints link to that copy.
- A global or spot color that an added tint or gradient links to, and that
  the document does not have, now comes in with the tint or gradient. It
  keeps its own name when that name is free and gets a number otherwise.
  added lists it after the picked swatches.
- A library tint is not the document's tint of the same name and paint
  when the document's swatch of the base's name is another color or kind.
- A tint that a pattern brought is used for a picked library tint only
  when the color it links to is the library color's kind.
2026-11-21 07:54:43 -08:00
dotCooCoo 0eaf435d6a Plug-ins: an edited grants file grants nothing, and its plug-ins ask again
grants.json now holds {"version": 1, "grants": [...], "mac": "..."}, where
mac is an HMAC-SHA-256 of the grants and of the plug-in folder, made with a
random 32-byte key kept in the system key store: the Keychain on macOS,
Credential Manager on Windows, the Secret Service on Linux and the BSDs. The
MAC is compared in constant time. A file without a valid MAC for its folder
(an edited or added grant, a removed or changed MAC, a file copied from
another folder) grants nothing, and its plug-ins ask for approval again.

This changes the default for existing files: a grants.json written by an
earlier version is a plain list without a MAC, so its plug-ins ask once
more, and the next approval replaces it with a signed file.

When the key store can't be reached, an approval lasts for the session
only, nothing claims to persist, and the existing file is left as it is.
The first key is made under a per-user lock and read back, so processes
that approve their first plug-in at the same time keep one key. The web
build keeps no grants file.

New native-only dependencies of vectorcraft-engine: hmac, sha2, getrandom
and keyring (all MIT OR Apache-2.0).
2026-11-21 06:19:05 -08:00
dotCooCoo 0d27204944 PSD import: keep clips and merges around adjustments that aren't applied
- An adjustment layer's mask is checked against the memory allowed beside
  the canvases held while it is read (the merged canvas, the base's shape
  and the copies kept for pass-through groups).
- A clipped adjustment layer whose mask is too large to read is left out
  without unclipping the layers clipped above it to the same base.
- An adjustment layer in a pass-through group whose mask is too large to
  read is left out without stopping the merge of the layer above the
  group; its own merge with the layers below it still isn't made.
- A layer whose stored pixels are all transparent draws nothing, so an
  adjustment layer above it in a pass-through group stays kept to change
  what is below the group.
- A layer merged in a pass-through group for its blend mode or its
  knockout takes the adjustment layers kept below it with it, so an
  adjustment layer above that group in an outer pass-through group merges
  with it instead of being dropped.
2026-11-21 06:11:57 -08:00
dotCooCoo 9772495468 Swatch libraries: check the color names a pattern copy gives
When a library tint waits for a color that a pattern's art brings,
swatch.library.add learns the color's name by importing the pattern into
a copy of the document. The import into the document now confirms those
names: when it gives a color another name, or none, the tints linked
from the copy are linked again.

- library.use and Add to Swatches report an error from the import that
  merges a pattern's colors instead of falling back to adding them.
- The params text, docs/mcp.md and docs/target-app-parity.md say that a
  tint or gradient links to the numbered copy its global or spot color
  comes in under or already has, and name a gradient test.
- The new code uses the HashMap import, and one helper relinks the
  added tints and gradients at both places that did it.
2026-11-21 05:42:17 -08:00
dotCooCoo 80b089590b Smooth: the long-curve click test puts the crest between the places a fixed search would look at
The click sat 0.15 pt from two of 1,024 evenly spaced places along the curve, so a fixed search found it too. The crest is now a cusp halfway between two of 65 evenly spaced places and more than the 12 pt reach from each, and the test checks that distance before the drag.
2026-11-21 05:37:52 -08:00
dotCooCoo aecf4b1284 PSD import: keep adjustment layers pending over layers that draw nothing
- A hidden pass-through group, kept with the hidden layers, and an
  adjustment layer at 0 opacity or 0 fill no longer hold back the
  adjustment layers above them in a pass-through group.
- Layers that draw nothing (no pixels stored, 0 opacity, or 0 fill with
  nothing clipped to them) and groups of only such layers don't count as
  content below an adjustment layer, so in a pass-through group it still
  changes what is below the group. Layers clipped to a layer at 0 fill
  or to an adjustment layer count as content.
- An adjustment layer whose layer mask is too large for the memory
  allowed is counted as not applied, merged or clipped, instead of
  stopping the layered import.
2026-11-21 05:21:56 -08:00
dotCooCoo f2d3b09fe6 Scripts: app, documents, selection and page items for scripts
Scripts get an app object with its documents, the active document and its
selection, and the page items of a document, read and edited through
commands so each edit is one undo step and is journaled. Host classes in
the JavaScript engine give each document or item one object while a script
holds it, answer `in` and indexed reads, and throw on stale objects and on
members that are not available yet.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-21 05:13:46 -08:00
dotCooCoo 162a3c1065 Scripts: a recovery copy with unreadable details restores as a script's document
A recovery copy whose details entry is missing or can't be parsed now
restores as a document a script opened, and the details written for the
moved copy say so, so a later restore does the same. A valid details
entry without the script's mark still restores as the person left it.

The script docs now say that a link does not let a command write the
file it names: a linked file is written only where the script's write
places or an open document's own file allow it.
2026-11-21 05:00:00 -08:00
dotCooCoo 35e43f9cfe Swatch libraries: library tints and gradients link to their colors in any order
A library tint or gradient whose global or spot color comes in under a
numbered name now links to that copy whichever order the swatches are
picked in, when the color was added by an earlier call, and when a
pattern's art brought the color or took the document's copy of it.
Adding the same tints again finds the ones added before.

- Each tint's or gradient's color is looked up for itself before
  anything is added, past a process swatch of the same paint and past a
  color group of that name. A numbered copy that the library's own
  swatch of that name is stays that swatch's, and a new copy skips the
  library's other names.
- A tint links to a global or spot color of the same kind only, and to
  a color this call picks rather than to a copy a pattern took.
- Links are set as soon as the color's name is known. A tint waiting
  for a color that a pattern's art brings learns its name from an
  import into a copy, so the pattern does not add a second tint.
- A swatch a pattern brought takes a picked swatch's place only when
  its colors link where the picked one's do.
- A stop linked to the Registration swatch counts as linked.
- library.use, Add to Swatches and the reuse check share one import
  probe (patternlib::probe_import), and the probed copy is kept instead
  of importing a second time.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-21 04:57:24 -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 2fcee16756 Scripts: a recovery copy keeps a script's change through a crash
A recovery copy's details now say that a script's command changed the
document before the new document entry is written, and a restore writes
a copy's details before its document entry in the new area. A crash
between the two writes no longer restores a script-changed document
without that record, so a later run cannot read the files its links name.

The docs say that a linked file in one of the script's own places inside
the settings folder is still read.
2026-11-21 04:08:23 -08:00
dotCooCoo f54afb117b Smooth: a drag that would not make a path smoother leaves it as it was
path.smoothRegion kept every changed result. A drag along the top of a
clean ellipse split it from 4 to 5 anchors without smoothing it, took
away its Live Shape and added an undo step, and a third drag left it
with 7 anchors and about 20% more turning.

Each subpath's result is now measured against the subpath at one
spacing: how much it turns along its length, with each turn at an
anchor counted twice, and how much it bends. The result is kept only
when it turns no more than a thousandth more and has fewer anchors,
turns less or bends less. Otherwise the subpath stays as it was; a path
with no kept subpath keeps its Live Shape, is left out of ids and the
counts, and a call that keeps nothing adds no undo step. The measure and
the thresholds are VectorCraft's own.

Three tests that dragged over a convex curve with nothing to smooth now
drag over a sharp peak or crest, so they still test the reach search
and a closed path of two anchors.
2026-11-21 03:56:08 -08:00
dotCooCoo e7bafe3d17 Dynamic Text: a leading on a range inside one character leaves Line Gap
text.setStyle, text.setRangeStyle and charStyle.apply style a range
with both ends moved back to character boundaries, so a range inside
one multibyte character styles nothing. The Line Gap now follows the
same range and stays as it is when no character was styled.
2026-11-21 03:29:21 -08:00
dotCooCoo a45e2dc710 Scripts: a linked file in the settings folder is not read through the linked list
The read check for the files the documents link to now applies the script
scope's fence of the folder that holds the settings, as the script's own
reads do. A file in a place left open inside that folder is still read.
2026-11-21 02:57:54 -08:00
dotCooCoo 64dd48d801 PSD import: apply Invert, Threshold and Posterize adjustment layers
File › Open with a PSD or PSB file's layers as objects now reads the
nvrt, thrs and post blocks of the PSD file format specification and
merges each such adjustment layer with the visible layers below it in
its group, changing their colors. Clipped to a layer, it changes only
that layer and the layers clipped to it. In a pass-through group with
nothing below it in the group, it changes what is below the group when
the group is merged.

Each channel is taken as an 8-bit sRGB value: Invert turns v into
255 - v, Threshold compares the Rec. 709 luminance with its level, and
Posterize maps each channel to the nearest of its evenly spaced levels.
The adjusted color is composited in the layer's blend mode at its
opacity and fill opacity, through its layer mask.

A hidden one is left out. One that layers are clipped to, one clipped
to another adjustment layer, one whose data can't be read and one
whose merge needs more memory than allowed are not applied and are
counted in the existing adjustment-layer warning. Other adjustment
kinds are still not applied.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-21 02:52:41 -08:00
dotCooCoo c3905aee4f Dynamic Text: a style's new leading applies to Block text, the Eyedropper keeps Line Gap
Block gives every character its size plus the frame's Line Gap, so on
Block text a character's leading is never an override. A character
style edited to a new leading now applies it there even when Block has
given its users other leadings than the old definition's, for example
after a Line Gap change or a refit, and the Line Gap moves.

The Eyedropper copies a whole character style, so the leading it copies
is no longer treated as a leading change: Line Gap stays, and Block
gives the characters their size plus the gap, as before this branch.

The tests now check that every character's leading is its size plus the
new gap for each path, and the docs say that Text Tweaker's ramp sets
the gap from its first character and does not vary the leading.
2026-11-21 02:50:05 -08:00
Zaxaerith cc3a8775ad docs(cli): correct artboard color export help (#8850) 2026-11-21 18:46:43 +08:00
dotCooCoo 29ddc57821 Scripts: what a script's commands open or change gives later runs no file access
The commands a script runs could read the files that the documents open
at the run's start link to, and could read and write the files of every
open document. Both lists were taken from the documents as they were, so
a document a script opened, or a link or data set value a script added,
widened what the next run could read, and a document opened from a
linked file could be saved over that file in the next run.

- DocState::by_script records what scripts' commands did to a document
  since the person last opened or saved it: opened it, or changed it or
  gave it another file, keeping the document, its file and the file it
  was read from as they were before. The script host notes it after
  every command, and a save the person makes from the document's current
  content clears it. Revert keeps it, and a recovery copy restores the
  document as one a script opened.
- The gate's document files and the linked files are taken from each
  document as the person left it (DocState::as_person_left). A document
  a script opened gives neither, in that run or a later one.
- This replaces the per-run record of paths read through the linked
  files and ScriptGate::keeping_linked_read_only.
- docs/mcp.md and docs/target-app-parity.md describe the rule.
2026-11-21 02:45:27 -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 2d6b8680e6 Dimension tool: whole-path dimensions keep clear of the path when turned
A dimension of a whole path whose line lay across the path, made vertical
or horizontal with dimension.update, now goes as far past the path as it
lay from its first point. Before, its line landed on the path's edge. A
line on the edge to within rounding still counts as outside the path.
When the new place would be more than 1,000,000 pt from the first point,
the update is an error unless it also gives offset, and the dimension is
left as it was. A dimension whose measured node is missing or is not a
path, as in a file that names a node it does not hold, is unlinked at the
next edit.

Tests: a dimension of a whole path saved in a native file and opened
again still follows the path, and one that names a missing node is
unlinked at the next edit; past a corner of the path the side the
pointer is farther out on decides; after the first point Alt picks a
point; a hovered segment's length stays by the pointer at a high zoom.

The line in docs/target-app-parity.md now attributes only the Alt hover
over a path to the linear dimensions help page. Docs: docs/dimensions.md
and dimension.update's params text.
2026-11-21 02:17:20 -08:00
dotCooCoo cee4f8d276 Parametric Shape: measure the box the same way before and after a W or H edit
With `reference`, `addon.pathtools.shape.set` measured the shape's box
before the edit with Use Preview Bounds and fell back to the geometric
box when the preview gave none, and it chose again after the edit. When
the preview gave a box before the edit and none after it, or the
reverse, the shape moved by the difference between two different boxes. The measure used before the
edit is now used after it.

The params text and docs/mcp.md now say that snapping to the pixel grid
and an attachment to a path apply after the reference point is kept,
as they do for the Transform panel's W and H. The docs line in
docs/target-app-parity.md changes only the lines it needs.
2026-11-21 02:04:10 -08:00
dotCooCoo c8d02b0dbd Retype: a glyph in an even-odd compound matches with only some of its contours reversed
An even-odd compound paints the same whichever way each contour runs, so
an o's counter may run the same way as its outer contour. Such a part
matched neither as it is nor with all its contours reversed, and stayed
an outline at tolerance 0. A part of a split compound is now also read
with each contour turned the way its depth gives (outer contours one way,
their counters the other), both ways round. In a nonzero compound those
contours paint the counter, and the painted-area check still keeps the
part an outline.

The containment test that splits a compound into glyphs moves into its
own function, `containers`, which the new reading also calls.

Docs: docs/mcp.md, docs/type-parity.md.
2026-11-21 01:58:44 -08:00
dotCooCoo 88f496d873 Tangent Circle Tool: Add Points to Existing Paths adds anchors where the circle touches
The tool gets an `addPoints` option (Add Points to Existing Paths in its
options, off to start). When it is on, drawing a circle also adds an
anchor point where the circle touches the first segment and the second
segment, splitting them without changing their shape. The anchors and
the circle are one undo step. A touch at an existing anchor adds none.

Alt held at the release turns the option the other way for that
circle, and a dot beside the pointer shows while it is in effect. When
a touched path was not selected, the selection is put back before the
circle is drawn, so Draw Behind places the circle behind the selected
objects.

The option label has a row in every complete catalog.

Part of #7178.
2026-11-21 01:54:54 -08:00
dotCooCoo 458e428663 Dynamic Text: a leading change on area type with Block on moves its Line Gap
Block sets each character's leading to its size plus the frame's Line
Gap and fits the text again after every edit, so a leading set from the
Character panel, the Properties panel, the Type tool's Alt+arrow steps,
a character style, the Eyedropper or Text Tweaker was accepted and then
overwritten. On area type with Block on, a leading change now sets the
Line Gap to the new leading less the size of the first character
changed, within -1,296 to 1,296 pt, in the same undo step, and every
line spreads or tightens by the change. text.setStyle and
text.setRangeStyle take keepLineGap, which
Reset Panel sends, so a reset to Auto leading keeps the frame's Line
Gap. Point type, type on a path and area type with Block off keep their
own leading.
2026-11-21 01:53:07 -08:00
dotCooCoo 2efe8814da Tests: drive the finger Rearrange check with touch events and check the view pans
The finger case of rearrange_is_not_placed_by_a_finger_once_a_pen_was_seen
now sends touch Start, Move and End events with the first finger pressing as
the pointer, adds a second finger and drags both, and checks that the view
pans while the waiting placement, the artboards and the history stay as they
were. The mouse placement check is unchanged.

rearrange_refuses_bad_indices_and_at also checks that an `at` that would put
an artboard past the canvas is refused and leaves the artboards and the
history as they were.
2026-11-21 01:51:40 -08:00
dotCooCoo bab25d0248 Scripts: a document opened from a linked file stays read-only when its path changes
The gate now records each path a script's command reads only because it led
to a file the open documents link to. A document whose file is such a path is
taken out of the open documents' files for the rest of the run, without
looking at where the path leads now or what the script may read now. Before,
the gate decided that again for each command from the path's current target,
so a path pointed at another file by a link, or a read grant given later,
let the run read and write through the document.
2026-11-21 01:32:08 -08:00
dotCooCoo 0098c45951 Blob Brush: a stroke at one point paints a dab, and the tip shows what the release paints
A Pressure or Stylus Wheel stroke whose samples all lie at one point
gave path.blob a spine with no length, and the command failed with
"empty brush stroke". It now paints one dab sized from the first
sample's reading, as a single point does.

When Size changes from Fixed to Pressure or Stylus Wheel during a drag,
the release sends no pressure or wheel for the stroke, so it paints at
the Size. The tip outline now reads the pressure and the pen pose only
when the release reads them, for the Blob Brush and the Eraser.
2026-11-21 01:22:05 -08:00
dotCooCoo c7eadb9656 Shapes: Curvature Circle docs say when Snap with Smart Guides Off has no effect
docs/mcp.md and the tool's module comment say that unchecking Snap
with Smart Guides Off does not change the reach when Selection &
Anchor Display's Tolerance is as large as it.

Two test comments now say the cubic's own curvature at the end of a
quarter circle is smaller than the circle's, as their assertions
check.
2026-11-21 01:10:23 -08:00
dotCooCoo 2389cdfd7f Smooth: Smooth Tool Options' Smoothness sets how strongly a drag smooths
Smooth Tool Options gets a Smoothness setting under Fidelity, from 0% to
100%, where a higher value leaves a smoother path, as the help page
describes the setting:
https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=164

- path.smoothRegion takes an optional `smoothness` (0 to 100, 50 when
  left out). It scales the spread of the averaging done before the
  refit in proportion: none at 0, today's spread at 50, twice it at
  100. A value outside 0 to 100 is an error and changes nothing.
- The Smooth tool keeps the option with its preferences and sends it
  with each drag; Alt smoothing with the Pencil, Paintbrush and Blob
  Brush uses it, as it already uses the Smooth tool's Fidelity.
  tool.setOption refuses a value outside 0 to 100.
- The default and the way the percentage scales the smoothing are
  VectorCraft's own; the default keeps today's strength.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-21 01:09:50 -08:00
dotCooCoo 222cd9a75d Merge main into feat/eyedropper-hover-highlight 2026-11-21 01:03:41 -08:00
dotCooCoo 38e36aeb81 Paths: Object > Path > Simplify and Smooth keep a closed path's start
Simplify and Smooth refit a closed path from its first corner and kept
that order, so the path's first anchor moved and its dashes started
somewhere else. A refit now starts at the old first anchor when it keeps
one there, otherwise at a new anchor where the refit passes nearest that
point while the result still has fewer anchors than the path had, and
otherwise at the refit's nearest anchor. Its direction stays the same.
A direct-selected run across the start follows the same rule; before,
the path started at the run's end anchor.

The Smooth tool's start_nearest moves into vectorcraft-pathops, and both
commands call it with the limit on anchor count above.
2026-11-21 01:00:16 -08:00
dotCooCoo d5e15200f1 Blob Brush: Size offers Stylus Wheel
Blob Brush Tool Options' Size menu offers Stylus Wheel beside Fixed and
Pressure. With it the brush is Size - Variation wide at one end of an
airbrush pen's finger wheel travel and Size + Variation at the other, in
a drag, a click and with a tip that is not round. A point without a wheel
counts as half way, and a mouse stroke keeps the Size.

- path.blob takes sizeMode "stylusWheel" with the wheel seventh in each
  point, and its error for an unknown sizeMode lists the three modes.
- The tool keeps the mode, records the wheel, and sends it on release.
  While the Blob Brush paints, its tip outline takes the size the pen
  gives (on Pressure too), and keeps the set angle and roundness. A wheel
  turned with the pen held in place updates the last sample.
- The Eraser's Size already offered Stylus Wheel and is unchanged.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-21 00:32:08 -08:00