Commit Graph
21712 Commits
Author SHA1 Message Date
dotCooCoo a149f93392 Script checker: code the check can't read keeps a Folder's length, hidden and readonly setters
The check leaves out `length`, `hidden` and `readonly` set on `new
Folder(...)`, a `Folder` place, or a variable holding one, but a script
can give that name a File object in ways the check does not read. Such a
setter now counts as a file write in a check whose files:

- use `with`, or name `eval`, `Function`, `evalFile` or `constructor`,
  as a word or as a string literal in brackets (`this['eval'](s)`,
  `$['evalFile'](f)`, `(function () {}).constructor(s)`)
- read, call or assign a property in brackets when the brackets hold
  anything but one string or number literal (`this[k](s)`,
  `this['ev' + 'al'](s)`, `this[('eval')](s)`, `this[0, 'eval'](s)`,
  `$[k](f)`, `g[k] = ...`), including a preprocessor line inside the
  brackets
- assign a property in brackets whose name is a string literal longer
  than 256 characters, or properties of more than 1,000 names
- assign or declare `Folder`

A variable whose name a member assignment writes (`$.global.d = ...`,
`this.d = ...`, `this['d'] = ...`) counts as one that may hold a File
object. Array literals, `o['plain']` and `a[0]` leave the Folder alone.

docs/mcp.md and the progress line in docs/target-app-parity.md state the
rule.
2026-11-23 09:54:50 -08:00
yoriswind f7a8565ca4 Merge current main for the gradient stop color-mode menu 2026-11-23 09:34:00 -08:00
Dylan M. Taylor 71965b6a42 ci(release): forward ARTCRAFT_SERVICES_DISPATCH_TOKEN secret (#9172) 2026-11-23 09:34:26 -05:00
dotCooCoo 1d2c274466 EPS: a colorized image in a white spot ink keeps overprinting
Discard White Overprint removed the overprint of a colorized image whose
color was white, even when that color was a tint of a spot swatch, which
the EPS writer still writes as that spot ink. A spot white now keeps its
overprint; process white still knocks out.

Document::spot_ink tells a tint above 0% of a spot swatch with a solid
color apart from paper white.
2026-11-23 04:57:10 -08:00
ViktorBystrov72 01566a4120 Place: measure aligned point type in embedded native artwork 2026-11-23 16:52:04 +05:00
dotCooCoo 26d2a08fe3 Merge main into fix/script-export-linked-files 2026-11-22 23:41:56 -08:00
dotCooCoo 6e713caf33 Merge main into feat/retype-installed-fonts 2026-11-22 23:39:38 -08:00
dotCooCoo 5a82ba3742 Overprint Preview: a colorized image showing a full-color preview keeps knocking out
A linked image whose file is missing shows its full-color preview as it
is, without its colorize paint, and separations and PDF export already
print it that way. Overprint Preview and simulated overprints in
composite output still darkened the whole image. darken_overprints and
image_overprints_whole now take the document's images and leave such an
image at its own blend mode, and the helpers that find the pixels a
colorized image shows move from the separations code to
vectorcraft_doc::overprint so both use them. The preview's cached art is
made again when the document's images change.
2026-11-22 23:07:34 -08:00
dotCooCoo f2f70faecf Merge main into feat/plugin-api-filter-type-images-symbols 2026-11-22 22:54:30 -08:00
dotCooCoo 144544aa20 Tests: set the ImageBlob file_font field in the colorized image separations test
main added the file_font field to ImageBlob, and the separations test
for an image whose pixels refuse its color built one without it, so the
vectorcraft-pdf tests did not compile after the merge of main.
2026-11-22 22:46:01 -08:00
dotCooCoo a6572d450a Merge main into feat/colorized-image-overprint 2026-11-22 22:38:01 -08:00
FredApps cd13884448 Merge pull request #9144 from FredApps/imo778-metafile-unit-facts
metafile: take WMF and EMF unit facts from craft-metafile (craft-libs#778)
2026-11-23 13:33:44 +07:00
FredApps a238c434ac Merge branch 'main' into imo778-metafile-unit-facts
Bring in the 205042e Rule-10 pin (#9160) and the #9157 Sonar note so
this branch contains current main.

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	apps/vectorcraft-web/Cargo.toml
#	crates/text/Cargo.toml
#	xtask/src/pdf_deps.rs
2026-11-23 13:03:29 +07:00
FredApps 0b25f2ab6f Merge pull request #9160 from FredApps/imo778-craft-libs-pin-205042e
deps: pin all craft-libs crates to 205042e (craft-libs#778)
2026-11-23 13:02:13 +07:00
dotCooCoo 653cc07c45 Docs: a library swatch named after its pattern takes the pattern's new name
A library swatch named after its pattern takes the name the pattern comes
in under when that name differs and no library swatch has it, as
pattern_swatch_name in crates/engine/src/cmd/swatchlib.rs gives it.
2026-11-22 21:55:56 -08:00
dotCooCoo 99c37518d2 Preferences: prefs.reset with Preferences open keeps the reset on OK
A prefs.reset run while the Preferences dialog is open now puts the
reset values in the dialog: the UI-only rows and the preferences of the
categories it reset, and the preference groups when it resets every
category. OK applies a reset still pending from outside the command
path before it reads the dialog. OK then applies the reset values
instead of the dialog's earlier ones, and leaves the open document's
units alone.
2026-11-22 21:44:45 -08:00
JonRC fc6b197b1c EPS file fonts: classify each type's fonts by its own bound fonts
The carried families were collected for the whole document, so type in
a font the file only names, of the same family and style as a carried
font, counted as carried though it draws in the fallback font, and its
fallback warning was missing. Each text's runs are now classified by
the file fonts bound to that text.
2026-11-23 02:07:00 -03:00
dotCooCoo 3b0823e432 Preferences: OK puts the reset task bar in the workspace it leaves
OK now sets Enable Contextual Task Bar before the Touch switch only
when that switch enters Touch, decided from the Enable Touch Workspace
preference, the touch screen and the current workspace. A Touch return
marker left from an earlier automatic switch no longer sends the value
to Touch. A prefs.reset applied after the panels draw requests a
repaint, so the next pass shows the reset rows.
2026-11-22 21:05:59 -08:00
dotCooCoo 270f7cb654 Docs: the key object's rectangle above the outline point limit
The current pane draws a thicker rectangle around the key object instead
of its outline when the key object alone has more than 100,000 outline
points.
2026-11-22 20:50:22 -08:00
FredApps 4811e6d414 Merge branch 'main' into imo778-craft-libs-pin-205042e
Bring in #9157 (SonarCloud archive job-cap note) so this Rule-10 pin
contains current main before landing.
2026-11-23 11:45:17 +07:00
dotCooCoo 94c4bfba7a Tests: a linked image inside a placed document follows this document's outline setting
A placed file whose own Show Images in Outline Mode is off shows its linked
image's pixels in grayscale, uncrossed, when this document's setting is on.
2026-11-22 20:33:43 -08:00
dotCooCoo edadc82827 Plug-ins: state what a compound path's reshape resets, and test an unflagged flatten of a guide member
docs/plugins.md now says that each new member keeps only the id of the
old member in its place, with its name, live shape, opacity, blending
mode, appearance, opacity mask and other settings of its own reset, and
that `guide: false` on a compound path makes each guide member an
ordinary path.

The compound path test also checks that `type: "path"` without `guide`
is refused for a compound path with a guide member and leaves the member
a guide, and its doc comment names members that are not paths.
2026-11-22 19:59:44 -08:00
ncic 563cbb298c Pencil: a redraw on an open path follows the way its ends run along it (#3793)
A stroke that starts and ends on an open path away from its ends now looks
at the way it runs along the path at each end. Where it starts it replaces
the part it runs along; where it lands it joins the part it runs into. So it
replaces the part between (and the path stays open), keeps the part between
and closes the path along the stroke, or, when its two ends disagree, keeps
the start's choice and ends where the pen is lifted.

An end runs along the path when its first stretch, as long as Edit Selected
Paths' distance, stays within that distance and moves along the path more
than away from it. An end that leaves or meets the path squarely follows the
other end; when both do, the stroke closes the path only if it goes round
both pieces beyond its ends.

This brings back closing across an open shape's opening (a C drawn over both
arms closes into a ring), which the previous commit had taken out, and keeps
a bump over an L's corner redrawing the corner.
2026-11-23 04:58:44 +01:00
FredApps 3e3d1d1386 Merge pull request #9157 from storytold/ci/sonar-archive-build-jobs-note
ci: note the shared SonarCloud archive job cap
2026-11-23 10:58:37 +07:00
JonRC a6511830f2 EPS file fonts: decide carried or fallback per family and style
The warning took a family as carried when any style of it was, so a
named bold beside a carried regular lost its fallback warning. Carried
and fallback are now decided per family and style, and a family can be
named in both sentences.
2026-11-23 00:53:54 -03:00
JonRC 610849efa3 EPS file fonts: only type shown in a carried font gets the kept font
The kept fonts were attached by family and style, so type in a font
the file only names whose family and style are those of a carried font
(`TestOne-Roman` beside an embedded `TestOne`) got the carried font too,
after its spacing had been set for the fallback font. Type shown in a
carried font is now marked when it is made, and only marked type gets
the kept font.
2026-11-23 00:53:54 -03:00
JonRC 104197e298 EPS file fonts: compare each glyph once, and keep a full font's new characters as outlines
`fits` compared each glyph with every earlier glyph of its character in
the string, so a long string of one character took quadratic work. It
now compares each glyph once with the one its character already has,
as PDF import's gathering does. It also checks the font has room for
the characters it doesn't have yet: a string that needs one more than
the font can hold comes in as outlines, keeping the file's look,
instead of as type the kept font can't draw.
2026-11-23 00:53:54 -03:00
dotCooCoo 97ac3c8c8b Outline view: linked images and placed documents show their box with an X
In Outline mode, with File > Document Setup > Show Images in Outline Mode
off, a linked image's frame is crossed from corner to corner, following
the corners of a turned or distorted image. A placed document shows its
box crossed, and its file's art no longer draws in Outline mode unless
the option is on. Embedded images keep a plain frame, and so do the
pieces that an envelope cuts an image into.

A placed document with raster effects or color adjustments stays
crossed. One with an effect that changes geometry, its own or its
group's, still draws its file's art reshaped and is not crossed yet.

With the option on, images show their pixels in gray and placed
documents show their art. The art inside a placed document now follows
the option of the document it is placed in rather than the placed
file's own setting.

Linked files showing as a box with an X in Outline mode is described at
https://helpx.adobe.com/illustrator/using/viewing-artwork.html; the
other rules are VectorCraft's own.

Docs: docs/ui-parity.md, docs/mcp.md; document.setup params text for
outlineImages.
2026-11-22 19:49:08 -08:00
FredApps c9c2d711d1 xtask: keep pdf-deps aligned with the 205042e craft-libs pin (craft-libs#778)
Shard 5 (Checks) failed because cargo xtask pdf-deps still expected
craft-pdf and the hayro/krilla backends at d7c9632, and hayro-jbig2 at
the leftover stream-codec pin. All of those crates now resolve at the
shared 205042e revision.
2026-11-23 04:26:33 +01:00
dotCooCoo 1612f363c5 Selection: the hidden-member rule sits next to editing_children
The rule for which children a selection highlight outlines moves from
the canvas into Node::drawn_children in vectorcraft-doc, next to
Node::editing_children. Both now read the Image Trace source image
through one private helper, and editing_children's doc comment says it
gives the editing bounds and that highlights outline drawn_children.
The highlight's behavior is unchanged.

- the_overlay_limit_leaves_out_hidden_members also covers a blend, a
  repeat and an intertwine.
- The repeat case of the compound-path test asserts its contour count.
- a_selected_group_leaves_its_hidden_members_unmarked reports every
  failed check together, so the hover highlight checks run even when
  an earlier check fails.
- The docs line now states which marks are tested for blends, repeats
  and intertwines, and that the rectangle drawn above the point limit
  and the Show Center mark still use the selection's bounds, which
  include a group's hidden members.
2026-11-22 19:21:52 -08:00
dotCooCoo 2fbe099c48 Plug-ins: refuse replacing a compound path's members when one isn't a path
A member that is not a path (a compound path inside a compound path) is
not in the input's `path`, so a changed `path` or `type: "path"` deleted
it, together with any hidden or locked members it held. The host now
refuses such an output with an error naming the compound path. A
compound handed back as it was still keeps the member.

docs/plugins.md also says that new members keep the old ids by position
but not their names or live shapes. The test covers a nested compound
member and turning a compound with a guide member into a guide path.
2026-11-22 19:15:57 -08:00
FredApps a3b0b3dec0 deps: pin all craft-libs crates to 205042e (craft-libs#778)
Rule 10: every storytold/craft-libs crate is at the same rev, now
205042e406b630cda653990649264a78fea6296b, the merge of #3136 on
craft-libs main. That rev still skips a form already on the drawing
stack (ISO 32000-2 §8.10.1) but no longer reports it as
ContentTruncated, so a 200-shape knockout-mask PDF imports completely.

Also moves the leftover per-crate pins of craft-font-catalog and
craft-web-api onto the same rev.
2026-11-23 03:59:59 +01:00
dotCooCoo b232fd8e96 Tests: hidden members in a repeat, a clip group, hover and other panes
The tests now cover the repeat, whose hidden source members are not
outlined, a clip group, whose clipping path stays outlined whether or not
it is hidden, a hidden object that is itself selected, the hover
highlight of a group with hidden members and another pane's outlines of
one. The overlay limit test reports the group and the layer case
separately. The comment on editing_children is back to main's text, and
the progress line lists the repeat and the new tests.
2026-11-22 18:48:21 -08:00
JonRC e377bbd24d Fix #9152: EPS import keeps the fonts a file carries for type whose family isn't installed
Type in a Type 1 or Type 42 font an EPS embeds came in as live type in
the fallback font when its family isn't installed. As PDF import has
done since #4569, the glyphs that type is shown in (outline and advance
from the font program, for each character) now become a font kept with
the document, which draws that type as the file does until its text is
edited, and spaces it by the glyphs' own advances. A string that draws
a character with a different glyph from the one kept for it comes in
as outlines. The warning names those families with PDF import's
sentence for fonts a file carries.

Fonts the file only names, Type 3 fonts and type from an Illustrator
editing copy are unchanged.
2026-11-22 23:38:19 -03:00
dotCooCoo a1995ad2b5 Gradient panel: name the row and proxy in the Presets menu's docs
The doc comment on presets_row and the docs line now say that an active
fill row takes the preset with the Fill proxy in front, and an active
stroke row with the Stroke proxy in front. The docs line describes the
help page's Fill or Stroke control as the page does.
2026-11-22 18:23:28 -08:00
FredApps 5022ba5593 ci: note the shared SonarCloud archive job cap
The reusable workflow now defaults build-jobs to 2 so a cold instrumented
archive stays within hosted-runner memory (craft-common-actions#333).
2026-11-23 03:21:18 +01:00
dotCooCoo 4f6e1515b4 Selection: a selected group leaves its hidden members unmarked
The selection marks walked every member of a selected group or layer, so a
hidden member, and the art inside a hidden group or a hidden sublayer,
showed its outline, its anchors and the lines across a linked image,
although the canvas does not draw hidden objects. The walk now skips hidden
members, so the selection marks, the hover highlight and the outlines in
other panes leave them out, and the overlay point limit no longer counts
their points. The same holds for the members of a blend, a repeat and an
intertwine. A compound path keeps every path, since it draws all of them,
and an Image Trace object keeps its hidden source image in the views that
show it. A hidden object that is itself selected keeps its marks.
2026-11-22 18:09:39 -08:00
dotCooCoo 2089ca34f7 Gradient panel: a preset from the Presets menu goes to the proxy in front
The Presets menu sent gradient.presets.apply without `stroke`, so the
command chose the fill or stroke by the Appearance panel's active row.
With a fill row active and the Stroke proxy in front, the preset went
to the fill the panel was not showing. The menu now passes the proxy in
front, as the panel's other controls do; an active row of that kind
still takes the preset.
2026-11-22 18:07:03 -08:00
dotCooCoo e4ce03a906 Plug-ins: a filter keeps a compound path's hidden and locked members
A filter that handed a compound path back rebuilt every member from the
returned path, even when the path was unchanged, so its hidden members
were shown and its locked members unlocked after any run.

- A compound path whose path comes back as it was, or is left out, keeps
  its members as they are.
- While a member is hidden, locked or a guide, a changed path or
  `type: "path"` is refused with an error naming the compound path. A
  guide member is allowed when the output also sets `guide`.
- A changed path still replaces the members, one per subpath, keeping
  the old members' ids by position.

Docs: docs/plugins.md.
2026-11-22 17:58:55 -08:00
dotCooCoo c7108b2289 Script File Access: name the whole path in Revoke's tooltip and description
A row shows at most 1,024 characters of a script or path, so two grants
whose paths differ only after that showed the same text in the row, its
tooltip and the Revoke button's screen-reader description. The tooltips
and the description now give the whole path, with control and
bidirectional characters still written as escapes; the row label stays
shortened.
2026-11-22 17:57:57 -08:00
dotCooCoo 54b9504cb5 JavaScript: a function body reserves room for its arguments object
The call reserves room for the declarations and the arguments object
before the body's let and const environment takes some of it. The body
then reserved room for its declarations again, but not for the
arguments object, so making the object could take the heap estimate
past the limit until the next check. The body now reserves both, with
the arguments size from one helper that the call also uses.
2026-11-22 17:52:55 -08:00
FredApps 53f5e552f8 Merge remote-tracking branch 'origin/main' into imo778-metafile-unit-facts
# Conflicts:
#	Cargo.lock
#	Cargo.toml
2026-11-23 08:38:58 +07:00
dotCooCoo 3886c93412 Scripts: say that script.grants lists no grants when the lock is busy
When the grants file's lock cannot be taken, script.grants returns the
error without reading the file, so the grants list is empty. docs/mcp.md,
the command's params text and the doc comments of stored_grants and the
Script File Access loader now say so, and keep "lists the well-formed
grants it can still read" for a file that is unreadable, over 4 MiB, of
another version, malformed or over 4096 grants.
2026-11-22 17:31:07 -08:00
dotCooCoo 5f611efdce Images: colorized image overprint skips clear rows, preview pixels and discarded white
- A fill or stroke with an opacity of 0 no longer counts as a row that draws on a
  colorized image, so it does not stop the image overprinting as a whole.
- On printed plates, an overprinting colorized image whose pixels do not take its
  color knocks out and prints as those pixels, instead of being hidden on the
  plates its color has no ink on.
- EPS export writes a white colorized image knocking out when Discard White
  Overprint is on, instead of leaving it out of the page.
2026-11-22 17:28:46 -08:00
FredApps 15001f7dfc Merge pull request #9123 from ruchirguitar/refactor/metafile-pict-shared
metafile: delegate QuickDraw PICT parsing to craft-metafile
2026-11-23 08:24:58 +07:00
dotCooCoo 723e52c5ec Merge #9079 into feat/js-es2020-optional-chaining-nullish 2026-11-22 17:15:41 -08:00
dotCooCoo 0b8dae1401 Delete: removing objects one at a time keeps the id lookup cache
Every Document::remove_many cleared the id lookup cache, and the next
lookup with no cache walked the tree once to answer and again to
rebuild it. Deleting objects one by id at a time with edit.clear walked
the whole tree twice per Delete: 20,005 walks for 10,000 objects.

- remove_many keeps the cache and records which children it took out
  of each parent. A cached path then counts a node's index among its
  siblings less the removed siblings before it, so the nodes left are
  found without a walk whichever objects were removed (top, bottom,
  middle, or the art below a layer's ruler guides). The cache has no
  path for a removed node or a node inside one. The cache is still
  dropped once the removed nodes are half of its entries, and when it
  does not have a listed node where it is.
- index_path with no cache builds the cache and answers from it, in
  one walk. An id that appears more than once is still walked to, so
  the first in tree order is returned as before.

Release build, deleting each object of one layer by id with nothing
selected. Walks for 1,000 objects went from 2,005 to 14 in each order.
For 10,000 objects, median of three runs:

  from the top:     20,005 walks, 5.53 s  -> 15 walks, 4.28 s
  from the bottom:  20,005 walks, 11.24 s -> 15 walks, 10.87 s
  from the middle:  20,005 walks, 10.62 s -> 15 walks, 8.62 s

Each Delete is still one undo step. The time left still grows with the
square of the count: each Delete rebuilds the parent's child list and
keeps a copy of the document for undo, and this change does not touch
either.
2026-11-22 17:06:53 -08:00
dotCooCoo e30ce7fcdc Swatch libraries: a nested pattern's swatch keeps its free library name
A pattern that a library pattern's art is painted with, whose numbered
name ("Inner 2") the document gives another pattern, came in as
"Inner 2 2" with its swatch under that name too, so adding the library's
"Inner 2" swatch next found that swatch and left the name unused. The
swatch now takes the library swatch's name when no swatch or color group
uses it, and still paints the pattern that came in.

A color a library pattern's art brings no longer reuses a numbered copy
whose name the library gives another swatch when the copy is that
swatch, whether or not the art uses that swatch. Before, only a copy of
a swatch the same add brought was left out, so adding the library's blue
"Ink 2" and then a pattern painted with its blue "Ink" linked the
pattern's art to "Ink 2".

The params text, docs/mcp.md and the progress line describe both rules,
and the progress line says that Use Library Item's numbered names do not
skip the library's other names.
2026-11-22 17:01:51 -08:00
FredApps f4cac4f30f Merge remote-tracking branch 'origin/main' into imo778-metafile-unit-facts 2026-11-23 08:01:38 +07:00
dotCooCoo 74ca9fb769 Scripts: XMP array items with xml:lang report the qualifier and language options
getProperty with an item path and getArrayItem gave an item with an xml:lang qualifier the
options 0. They now give PROP_HAS_QUALIFIERS and PROP_HAS_LANG, as a property with xml:lang has,
and docs/mcp.md says so.
2026-11-22 17:01:23 -08:00