Commit Graph
9527 Commits
Author SHA1 Message Date
BFlat d48c4207f7 Merge pull request #9102 from dotCooCoo/feat/colorized-image-overprint
Images: Overprint Fill makes a colorized image's color overprint
2026-11-24 16:39:55 +07:00
BFlat 11a26acb0b Merge pull request #9109 from dotCooCoo/feat/js-es2020-optional-chaining-nullish
Scripts: .js scripts read optional chains and the ?? operator
2026-11-24 16:09:45 +07:00
BFlat cf2c4ae3f7 Merge pull request #9187 from dotCooCoo/fix/js-dollar-stack-script-frame
Scripts: $.stack starts with a line that names the running script
2026-11-24 16:08:08 +07:00
BFlat 0773e17df5 Merge pull request #9161 from dotCooCoo/feat/outline-linked-image-x
Outline view: linked images and placed documents show their box with an X
2026-11-24 16:07:52 +07:00
BFlat 3049775dee Merge pull request #9156 from dotCooCoo/fix/plugin-compound-member-state
Plug-ins: a filter keeps a compound path's hidden and locked members
2026-11-24 16:07:35 +07:00
BFlat c3c02f81e0 Merge pull request #9128 from dotCooCoo/fix/print-fonts-setting
Print: the Fonts setting chooses how PostScript output sends type
2026-11-24 16:06:58 +07:00
BFlat 87de595305 Merge pull request #9096 from dotCooCoo/fix/plugin-run-no-op-undo
Plug-ins: a run that changes nothing records no undo step
2026-11-24 16:06:33 +07:00
BFlat 7696b503e6 Merge pull request #9079 from dotCooCoo/feat/js-es2015-block-arrow-template
Scripts: .js scripts run let, const, arrows, templates, default and rest parameters and spread
2026-11-24 16:06:07 +07:00
BFlat c79555c25c Merge pull request #9070 from dotCooCoo/feat/scripts-unitvalue
Scripts: UnitValue measurements convert and calculate with their units
2026-11-24 16:05:51 +07:00
BFlat 50a4d049fb Merge pull request #9063 from dotCooCoo/feat/three-d-mesh-attributes
3D: meshes carry UVs, smooth bevel normals and a part index
2026-11-24 16:05:34 +07:00
BFlat 2e09e5135f Merge pull request #9046 from dotCooCoo/feat/quick-pen-arc-center-i9314
Pen: Quick Pen marks an arc's center with a cross while the arc is drawn
2026-11-24 16:05:16 +07:00
BFlat fd349e4d11 Merge pull request #9015 from dotCooCoo/fix/smooth-no-worse-pass
Smooth: a drag that would not make a path smoother leaves it as it was
2026-11-24 16:05:00 +07:00
BFlat 1bd8c8cb6e Merge pull request #8987 from dotCooCoo/fix/script-export-linked-files
Scripts: vc.run export of an open document reads its own linked files
2026-11-24 16:04:43 +07:00
BFlat 86a03fcdff Merge pull request #8986 from dotCooCoo/feat/dimension-alt-object-size
Dimension tool: Alt over a path places its overall width or height
2026-11-24 16:04:27 +07:00
BFlat 293dde3d19 Merge pull request #8981 from dotCooCoo/fix/smooth-region-bounds-prefilter
Smooth: a drag over a long path measures only the anchors and segments near it
2026-11-24 16:04:10 +07:00
BFlat 7d984fc7f3 Merge pull request #8964 from dotCooCoo/feat/plugin-manifest-section
Plug-ins: read the manifest from a custom section before running any code
2026-11-24 16:03:53 +07:00
BFlat b4696e31f6 Merge pull request #8933 from dotCooCoo/fix/relink-mask-matching-file-path-docs
Docs: a clipping mask that matches the old file's clipping path is relinked as the file's
2026-11-24 16:03:22 +07:00
BFlat 2d978d843c Merge pull request #8932 from dotCooCoo/fix/palette-typo-description-order
Command Palette: docs rank typo results that match a word by description last
2026-11-24 16:03:05 +07:00
BFlat ae0abde1a6 Merge pull request #8889 from dotCooCoo/fix/i18n-message-scan-escapes
i18n: the message scan reads string escapes the way Rust does
2026-11-24 16:02:14 +07:00
BFlat ca09a61d72 Merge pull request #8880 from dotCooCoo/fix/align-to-selection-anchors-docs
Align: align.toSelection returns "artboard" only for one object with no anchor points selected
2026-11-24 16:01:58 +07:00
BFlat 8b4a57f4e3 Merge pull request #8818 from dotCooCoo/fix/selection-widget-double-click-transform
Live Corners: a Selection tool double-click on a corner widget shows the Transform panel
2026-11-24 16:01:41 +07:00
BFlat 066aaed62f Merge pull request #8814 from dotCooCoo/fix/retype-drawn-shape-font-state
Retype: no retyped line starts with a combining mark
2026-11-24 16:01:24 +07:00
BFlat 2ef89d479e Merge pull request #8798 from dotCooCoo/fix/live-paint-bucket-journal-replay
Live Paint: bucket paint commands replay from the journal with any tool
2026-11-24 16:01:02 +07:00
dotCooCoo 116a8c2411 Overprint: a white spot ink keeps overprinting with Discard White Overprint
With Discard White Overprint on, PDF export, Overprint Preview,
Separations Preview and printed separations took the overprint off any
white paint, including a tint above 0% of a spot swatch whose color is
white, which prints as that ink. Such a tint now keeps its overprint in
fills, strokes, character paints and a colorized image's color; process
white and a 0% tint still knock out.

DiscardWhite holds the setting and the document's spot inks, and
Document::discards_white_overprint gives the same answer for the PDF and
EPS writers.
2026-11-24 00:45:00 -08:00
BFlat 6f37bd839c VectorCraft on the craft UI framework (#8800)
VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.

About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.

Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
2026-11-24 08:25:24 +07:00
dotCooCoo f205705617 Scripts: $.stack starts with a line that names the running script
$.stack is the current stack trace
(https://extendscript.docsforadobe.dev/extendscript-tools-features/dollar-object/).
It now starts with a line holding the run's name in square brackets, such
as `[main.jsx]`, the name the console shows for the run: the `name` given
to `script.run`, else the `#script` name, else the file's name, else
`script`. The frames follow as before. Scripts that look for a bracketed
line in the trace to find their own name, for example to name a
preferences file, now find it.

The name line comes before the `…` line that stands for frames past 64.
A realm without a name (`Realm::set_script_name(None)`) writes no such
line.

Docs: docs/mcp.md ($ object table), docs/target-app-parity.md.
2026-11-23 11:17:06 -08:00
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
dotCooCoo 26d2a08fe3 Merge main into fix/script-export-linked-files 2026-11-22 23:41:56 -08:00
dotCooCoo a6572d450a Merge main into feat/colorized-image-overprint 2026-11-22 22:38:01 -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
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
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
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 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
dotCooCoo 723e52c5ec Merge #9079 into feat/js-es2020-optional-chaining-nullish 2026-11-22 17:15:41 -08:00
5af36bae87 Fix #4568: PDF import keeps embedded fonts for text whose family isn't installed (#4569)
* PDF import: keep embedded fonts for text whose family isn't installed

Glyphs drawn in an embedded font whose family isn't available are gathered
during import and built into one small TrueType font per family and style,
kept with the document (font/ttf blob). Text objects record the fonts and a
hash of their text: layout and rendering draw them in the kept font until the
text is edited (undo restores it) or the family is installed. Lines are
spaced against the file's own widths with per-glyph placement (#3756).

* PDF import: satisfy crate layering constraints without format dev-dep

* FileFont: negate us_win_descent in i32 to prevent overflow on extreme negative descenders

* PDF import: a kept font carries the file font's licence flags, and the docs say what that means

Review of #4569: the fsType of the file's font is copied to the font built from its glyphs (a test pins it against Embedding), so exports honour it; the docs state the limits, that the file's font program is not parsed, and that a saved file carries third-party glyphs.

* PDF import: a glyph curve far outside any glyph is left out; docs say what the limits and the font program mean

CodeRabbit on #4569: coordinates beyond 1e6 font units are refused before the curve is subdivided. The docs say the 64-font limit is what draws one type object and that the file's font program is read only for its licence flags and metrics.

* PDF import: two programs of one font keep the stricter licence flags; the docs cite their sources

CodeRabbit on #4569: embedded programs of one family and style share one built font, which kept the first program's fsType; it now takes the stricter of the two, whichever came first. The docs entry cites the Acrobat Help pages and the OpenType fsType specification.

* fmt

* PDF import: embedded fonts are on by default, with an opt-out preference

Owner decision on #4568. Preferences > File Handling > Use fonts embedded in imported PDFs (pdfImportEmbeddedFonts, on by default) and the embeddedFonts param of document.open and file.place: off, a PDF's type in a font the machine lacks is set in the fallback font with the missing-font warning, as before. One test each for on and off, one for the preference reaching the options.

* fmt after merging main

* docs: restore the status lines damaged by merges (main's line plus this PR's note)

* PDF import: set embedded_fonts through a builder method (keeps read_opened under the complexity limit)

* PDF import: move the missing-font notes out of read_opened (complexity limit after the merge)

* #4569: isolate file-font resources and reclaim live faces (UNVERIFIED)

* Preserve carried-font ownership across placement and recovery

* Fix carried-font regression test dependencies and unwind probe

* Use explicit OS2 heights in owned-font reference regression

* Keep native font regression artwork inside document layers

* fix(engine): bind file fonts when reading document profiles

* test(engine): initialize file-font leases in new image fixtures

* test: complete file-font lease initialization in image fixtures

* docs: keep the #4568 entry in the file-format parity status line

* fix(pdf): keep a line with another glyph for the same character as outlines (review)

A font kept with the document has one glyph per character. A glyph of the file's font that
differs from the one already kept for its character (a stylistic alternate that maps to the same
Unicode scalar) marks its line, which is imported as outlines so each glyph draws as the file
does.

* docs: resolve the leftover status-line conflict

* Placed document blob: give the new ImageBlob literal its file_font

* Test: a PDF's two glyphs for one character survive a native save and reopen as the file draws them

* Test: move the native save and reopen half of the two-glyphs regression to the engine (layers: no format dev-dep in pdf)

* Fix embedded-font preference help and English fallback checks

* Format embedded-font preference help with the workspace edition

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: skylartaylor <hi@skylar.cc>
2026-11-22 18:18:18 -06:00
dotCooCoo e37b052028 Print: the PDF fonts note names the fonts drawn as outlines
PDF print embeds subsets only of the fonts whose licenses allow it and
draws the others as outlines. The note that None and Complete add now
says so, as do the Fonts params text, docs/mcp.md and the progress line.
2026-11-22 12:12:38 -08:00
dotCooCoo 2f465a09c3 Docs: ES2015 test262 counts include the tests that do not tokenize
The ES2015 subset now runs the tests whose sources the token reader
rejects, 151 more runs, so the evidence line gives 533 of 708 other runs
and lists the forms that the runs that do not parse use.
2026-11-22 11:03:57 -08:00
dotCooCoo 1596380f23 Merge #9079 into feat/js-es2020-optional-chaining-nullish 2026-11-22 10:48:32 -08:00
dotCooCoo c067c20788 Images: colorized image overprint follows every painting effect and gray ink in EPS
- Overprint Preview, Separations Preview and printed separations show a
  colorized image knocking out when it has any visible effect of its own
  that paints colors (a shadow, a glow, a raster effect, a color
  adjustment or a plug-in effect). Only the geometry effects leave it
  overprinting; a test keeps that list equal to the geometry effects of
  the effect catalog.
- EPS export writes an overprinting colorized image in a gray color as
  black ink alone (a DeviceN image at Level 3, a Separation image at
  Level 2), so it keeps the cyan, magenta and yellow below.
- On an EPS separation plate, an overprinting image without the plate's
  ink is left out only while overprints are preserved.
- Reading a legacy .ai file, a colorized image mask takes the fill
  overprint in force, as it takes the fill color: its own O, or the last
  O before it.
2026-11-22 09:38:04 -08:00
dotCooCoo e3d10ec15e Images: colorized image overprint keeps main's white rule and skips painted effects
White now follows the rule main has for white fills: with Discard White
Overprint on, PDF export, the previews and printed separations knock a
white color out, and EPS export turns overprinting on as it does for
fills and strokes. The changes to EPS output for white fills and to white
spot inks are no longer part of this change.

- The previews and printed separations treat an image with a visible
  drop shadow, outer glow or Gaussian blur of its own as knocking out, so
  the effect is not darkened or hidden with the image.
- Legacy .ai reading takes an image mask's fill overprint only from an O
  written after the previous object, not from the path before it.
- A fill of None, which takes the color off, also turns its overprint off.
- On a PostScript separation plate, an overprinting image whose color puts
  none of the plate's ink down is left out while a fill or stroke of it
  still draws, and an image that does not overprint as a whole knocks out.
- PDF export writes an overprinting gray color as an image of black ink
  alone, so the other process inks below it stay.
2026-11-22 08:48:09 -08:00
dotCooCoo 23ad161d30 Print: the Fonts setting chooses how PostScript output sends type
The Graphics section's Fonts setting was stored but no print writer read
it: PostScript output always drew type as glyph outlines.

- Subset (the default) defines, in each page's setup, Type 3 fonts drawn
  from the faces' outlines that hold only the glyphs that page shows.
- Complete defines every glyph of each face the job shows once, in the
  job's setup, and fails with an error before writing anything when the
  definitions would take more than 64 MB.
- None sends no font program: each page asks for the printer's copy by
  its PostScript name (%%DocumentNeededResources, %%IncludeResource) and
  names each glyph in an encoding, with a note naming each font.
- Type in a gradient or pattern, color glyphs, glyphs bent along a
  curved path, ruby and, under None, glyphs without names stay outlines.
  So does type in a font whose license forbids embedding, or, under
  Subset, allows only whole embedding, with a warning.
- Only the sheets the print order prints are drawn.
- PDF print still embeds font subsets; None and Complete add a note
  saying so, in the print and its preview.

Docs: docs/mcp.md, the print.setup params text, docs/target-app-parity.md.
2026-11-22 08:40:41 -08:00
dotCooCoo 15fefc9930 JavaScript: block functions, spread and global declarations follow ECMAScript 2015
- A block function whose name a function of an enclosing block declares is
  not assigned to the variable of that name.
- A labelled function in a block is made when the block is entered, and the
  parser checks it against the `let` and `const` names of its statement list.
- A function standing alone as an `if` branch gets a block of its own.
- Spread reads a `String` object by code point, and reads an array's length
  again before each element.
- A `var` or function declared on the global object stops a later `let` or
  `const` of its name until its property is deleted, and a `var` the global
  object cannot take is a `TypeError` before anything is declared.
- A call keeps its callee, receiver and arguments reachable until its frame
  holds them, and global and eval code keep their environment and their heap
  charge until their frame is pushed.
- Template objects are released when no code that can run holds their sites,
  even when one code has several sites.
- `Realm::set_es2015` during a run applies once the run ends.
- A template piece that spans lines does not let a preprocessor line start
  after it on its last line.
2026-11-22 08:21:30 -08:00
dotCooCoo 100a954317 Images: an overprinting colorized image keeps the inks its color leaves out
- EPS export writes an overprinting colorized image in a CMYK color in
  only the process inks the color puts down: one DeviceN image at
  Level 3, one Separation image per ink at Level 2. A pass turned away
  at the page limit takes back the passes before it, and the encoding
  cache keeps overprinting and plain encodings apart.
- A fill or stroke of a colorized image counts as drawing only with a
  visible Convert to Shape or Outline Object (one shared list with the
  effects crate), so another effect, such as Offset Path, no longer
  keeps the image from overprinting as a whole.
- Flattening without Preserve Overprints, and clearing overprints on
  PDF import and printing, also clear the overprint an image keeps
  after its color is removed, so a color given later knocks out.

Docs: docs/mcp.md (Overprint), docs/target-app-parity.md.
2026-11-22 08:18:56 -08:00
dotCooCoo faa5e3062c Scripts: .js scripts read optional chains and the ?? operator
With Options::es2015, vectorcraft-js reads and runs two ECMAScript 2020
forms: optional chains (a?.b, a?.[key], f?.(args) and the accesses and
calls after them) and ??.

- An optional step that finds undefined or null ends the whole chain
  with undefined, without evaluating its other keys and arguments.
  Parentheses end a chain. a?.b() and a.b?.() call with a as this,
  (a?.b)() does too, eval?.(code) is an indirect eval, and delete a?.b
  is true when a is undefined or null.
- ?? keeps any left side other than undefined and null.
- ?. before a digit still reads as ? and a number (a?.5:1).
- Mixing ?? with && or || without parentheses, assigning to or updating
  an optional chain, a tagged template after one and new a?.b() are
  syntax errors.

Two new jump instructions test for undefined and null, and the verifier
checks both of their paths. A chain of any length compiles with a loop.
.jsx files and source strings stay ES5.1, where ?. and ?? are syntax
errors.

The test262 ES2015 subset now also reads expressions/optional-chaining
and expressions/coalesce: 426 of 426 negative parse runs and 591 of 615
other runs pass with the option. The 24 failing runs are the same as
before this change.
2026-11-22 06:45:48 -08:00
dotCooCoo 4f73ef7fbb Images: Overprint Fill makes a colorized image's color overprint
A grayscale or 1-bit image colorized with a fill color had no way to
overprint: object.setOverprint {fill: true} changed nothing, since an
image has no fill row. The color now carries its own overprint flag
(colorize_overprint in native files).

- object.setOverprint (fill, without item) and attributes.info set and
  read it; Overprint Black and Print Ink Fixes' Remove White Overprint
  treat the color as the image's fill.
- Overprint Preview, Separations Preview and printed separations show
  the inks below the image where its color has none; on a plate the
  color puts no ink on, the image is left out.
- PDF export draws the image in an overprinting graphics state, a
  process color as an image of only the process inks it puts down.
- EPS export turns overprinting on for it, and now leaves white fills,
  strokes and colorized images knocking out with Discard White
  Overprint, as PDF export does.
- A legacy .ai file writes it as the image mask's fill overprint and
  reads it back. Warped pieces, geometry-effect copies and flattening
  keep or drop it as they do for fills.
- A white spot color is an ink: with Discard White Overprint it keeps
  overprinting in PDF and EPS export and in both previews.

Docs: docs/mcp.md (Overprint, Print Ink Fixes), docs/target-app-parity.md.
2026-11-22 06:15:41 -08:00
dotCooCoo 02ebfb7b8e Plug-ins: a run that changes nothing records no undo step
A filter run, a plug-in command, or a run that calls commands applied its
output through Session::edit, which records an undo step and marks the
document modified even when the output changes nothing. The output is now
applied to a copy first, as colorcmds::edit_if_changed does: only a copy
whose objects or kept documentData differ becomes the document, as one undo
step. Otherwise the document, its undo history and its saved state stay as
they were, and the run's objects are still selected.

Docs: params text of plugin.run and plug-in commands, docs/plugins.md,
docs/mcp.md, docs/target-app-parity.md.
2026-11-22 05:40:50 -08:00
dotCooCoo af91c28c64 Merge main into feat/scripts-unitvalue 2026-11-22 00:30:37 -08:00
dotCooCoo f287c5fabb Docs: name the failing test262 runs as ECMAScript 2015 rules 2026-11-21 23:07:28 -08:00
dotCooCoo 8d0001308f Merge main into feat/js-es2015-block-arrow-template 2026-11-21 22:52:36 -08:00