docs/target-app-parity.md gets a line for the file.write report on a
File object's length, hidden and readonly and for the test that lists
every name the script host adds, with the tests that cover them. The
test's comment on vc no longer names another app.
Setting a File object's length truncates or pads the file, and setting
readonly or hidden changes it, but script.check reported no outside
category for those assignments. It now reports file.write and
filesWritten for them: plain and compound assignment, ++ and -- before
or after, and the property name as a string literal in brackets.
A new integration test lists every global and member the script host
adds to the JavaScript engine (the own properties of the global object,
of each object or function it holds and of each function's prototype,
compared with a plain engine) and fails when one has no row. Each name
that reaches outside the document has a probe script, and the test
checks that script.check gives it the expected outside id. vc is listed
as not checked: script.check reads scripts written for the reference
app's scripting, and what vc.run does depends on the command. The test
also checks that the checker lists every preprocessor directive the
host reads, through the new DirectiveName::ALL.
File object properties:
https://extendscript.docsforadobe.dev/file-system-access/file-object/
A folder load checked each .wasm path and then opened it with a blocking
open. When a named pipe replaced the file between the two, the open held
the load until something wrote to the pipe, and with it startup or a
prefs.set of the folder. On Unix the file is now opened
without waiting and without making a terminal the controlling terminal,
and the opened file is checked again: anything that is not a regular file,
or is over the module limit, is refused and listed in the folder report.
A folder load still reads at most 1,000 .wasm files, the first by file
name, and now holds only those paths while it lists the folder. The
files past the first 1,000 were dropped and not reported; plugin.reload
and plugin.list now return their count as leftOut. An error while the
folder is listed fails the load, as an error opening the folder does,
instead of dropping the entries after it.
* refactor(cdr): depend on shared craft-cdr from craft-libs (#1665)
Replaces the local crates/cdr (vectorcraft-cdr) crate with craft-cdr
from storytold/craft-libs#2697 (storytold/craft-libs#778), keeping
VectorCraft's document/artboard/layer/shape mapping in crates/engine.
Co-authored-by: dotCooCoo <[email protected]>
* build(cdr): pin craft-cdr to craft-libs main (75d179f8df)
* build(cdr): pin craft-cdr to craft-libs main (9b28b56bc7)
* docs(cdr): point CDR/CMX provenance and test paths to craft-cdr
---------
Co-authored-by: dotCooCoo <[email protected]>
Part of #1210.
- `cargo xtask corpus --scripts` fetches 397 scripts and 1 included file
from 19 MIT and Apache-2.0 repositories at pinned commits into
corpus/scripts, each repository's license file beside its scripts.
xtask/script-corpus.txt lists every file with its size and SHA-256; a
download replaces the previous copy only when both match. One more
candidate is listed as excluded because it is over the 1 MiB limit for
one script. The fetch caps 64 MiB of scripts and 128 MiB of transfer,
refuses `..`, absolute paths, reserved names, case-fold collisions and
links, and holds a lock file while it runs.
- `cargo xtask corpus` takes at most one of --download, --affinity and
--scripts, and refuses other arguments with the usage text.
- `cargo xtask scripts --pass-rate [--report <path>]` runs each script in
a process of its own (the ignored `row` test in
crates/engine/tests/script_corpus.rs): a new document, 5,000,000
instructions, no dialog answers, file reads only in the script's
repository folder and a new folder of its own, file writes only in that
folder, stopped after 10 seconds. It writes a JSON report with the pass
rate overall, per repository and for scripts without dialogs or
windows, how many parse, and each script's outcome, with local folders
removed from messages. Script failures never fail the command, and
without the corpus it prints a skip line and exits 0.
Pasted type whose custom set was edited after the copy is checked against
a fresh layout by its line ends, which move from A to B while the line
count stays the same, so the test fails without the relayout in Relink.
The every-line composer's first-word measure is checked in a frame whose
top is narrower than the word the custom set's Cannot End Line makes, so
the test fails when that measure uses the built-in setting instead.
A plain symbol instance does not expand on its own, so the Safe Mode
plug-in check skipped its symbol's art. When a group or layer around the
instance has a raster effect (its own, or on one of its fills or
strokes), the group's image draws that art, plug-in effect included, and
Expand Appearance committed pixels without the plug-in effect instead of
returning the Safe Mode error. The check now looks into every object of
such a group or layer, symbol art included.
A plain Lasso click away from the art deselects everything but kept the
mesh points the tool held, so the Mesh tool chosen next showed the
deselected points as picked, nudged them with the arrow keys and
recolored them with a fill color. The click now unpicks them. Shift and
Alt clicks still change nothing.
docs/target-app-parity.md also lists the Eyedropper among the tools that
keep the picks, and docs/mcp.md describes the Lasso click.
Test: a_lasso_click_that_deselects_unpicks_the_mesh_points in
crates/engine/src/tests/mesh_picks.rs.
symbol.place, symbol.placeFromDocument and symbol.addFromLibrary with
`place` now read the drawing mode: in Draw Behind the new instance goes
directly below the selected object, or at the bottom of the current
layer when nothing is selected, as the help page describes for placing
symbols
(https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/learn-drawing-basics/drawing-modes-overview.html).
Place Symbol Instance in the Symbols panel and a symbol dragged onto
the canvas from the Symbols panel or a symbol library all go through
these commands.
VectorCraft's own rules: with several objects selected the instance
goes below the bottommost one, a selected path in a compound path puts
it beside the compound path, and a clipping path stays at the bottom of
its clip group or clipping layer. Draw Normal and Draw Inside keep the
instance on top of the current layer, and a locked or hidden layer
still refuses it with no edit.
An image that keeps CMYK inks is stored as TIFF, and Unembed writes it as a .tif file when the path has no extension. The comment above the format choice now lists TIFF with PNG, JPEG, GIF and WebP.
graphicStyle.redefine passed the redefined style to every path directly in a
graph series group linked to it, and to every line and label of a linked Axes
or Legend group, so a member linked to another style (the `from` style or a
third one) was restyled and relinked to the target. Such a member now keeps
its look and its link, in the `from` and the object forms; unlinked members
and members still linked to the target follow as before. The group is still
cleared and unlinked, and one undo takes it all back.
Gradient mesh points picked with the Mesh tool, Direct Selection, the
Lasso or the Polygonal Lasso now stay picked when another of these tools
is chosen, and when one of them lends Direct Selection for a Cmd/Ctrl
click, so a fill color chosen afterwards recolors just those points.
Before, only a switch to or from the Eyedropper kept them. Any other
tool, Group Selection included, drops them.
Session::switch_tool, lend_selection_tool and give_back_tool share one
test of which tools pick mesh points. Giving the tool back leaves the
lender's picks alone when they did not change, so the Mesh tool keeps
the point whose handles it shows.
Tests: crates/engine/src/tests/mesh_picks.rs.
Docs: docs/mcp.md, docs/target-app-parity.md.
A single-file PDF with Preserve Editing of an artboard range carries the
whole document, so a confined export of it checks the links on every
chosen artboard. The new test exports artboards 1-2 as one PDF, then
places an image linked outside the read roots on the second artboard
only and checks that the export is refused without writing its folder.
It also checks that assets.export refuses pdfs `single`, the source
that pdfs `single` does not accept.
Follows #8765. graphicStyle.apply with target "contents" gave every face
and edge of a Live Paint group the whole style, so faces drew the style's
strokes along their outlines and edges drew its fills. Each face now takes
only the style's fills and each edge only its strokes, with or without
add, and neither is linked to the style. An add that gives a face or edge
nothing leaves it and its link as they are, and an apply that changes
nothing records no undo step.
appearance.clear on the contents leaves a face one empty fill and an edge
one empty stroke, and appearance.reduceToBasic keeps only a face's fill
and only an edge's stroke.
Docs: docs/mcp.md, params text, docs/target-app-parity.md.
Each shape votes for every face it fits, and each glyph is set in the face
with the most votes. When faces tied, each glyph took its own closest face,
so one line could be set in several fonts. With Noto Sans CJK SC loaded,
simplified Source Sans 3 outlines of "Tim" fit both faces (and Noto Sans
Hebrew) three times each: T and m took Source Sans 3 and i took Noto Sans
CJK SC, so T and m were left as lone outlines.
A tie now goes to the face with the least leftover distance summed over the
shapes that fit it, so every glyph that fits that face takes it.
The glyphs of a split compound path can become separate type objects, for
example on two lines. A compound filled by the nonzero rule whose glyphs
overlap passed the paint check, and with an opacity below 100% the two objects
then painted the overlap twice. A split whose parts overlap now keeps the shape
an outline when the shape has an opacity below 100%, a blend mode other than
Normal, a gradient or pattern fill or a stroke.
Splitting a compound path copies its contours and compares each with the
others. A selected compound of a few contours with a very large number of path
elements was split however many elements it had. Such a shape is now matched
whole only, like one of more than 256 groups or 512 contours.
A near-matched glyph joins a line when its size and turn are each within the
tolerance of the line's, and the line's type then draws it at the line's size
and turn. Together with the glyph's own leftover distance, that change could
put the drawn glyph further from its shape than the tolerance: an m 4% larger
and turned 0.04 radians stayed on its line at tolerance 0.05.
The layout check now also measures, for each near-matched glyph (and each glyph
of a line whose first glyph is one), how far the change from its matched size
and turn moves the drawn outline relative to its spread, combined with its own
leftover distance, and splits the line before it when that passes the
tolerance, or when the glyph's center sits further away than its origin may.
A compound path whose split with the longest runs and split with the shortest
runs both failed the paint check stayed an outline, even when another complete
split (AB and CD for groups A, B, C and D) passed it. The split search now
checks the other complete splits in order, at most 32 per shape for exact
matches and 32 for near matches, and looks each run of groups up at most once,
only when the search reaches it.
Lines that a compound path of several glyphs splits into share that
shape, so the check that one line's shape comes right after the last
line's never passed for them, and each line stayed an object of its own.
Two lines of one shape now follow each other, and the other joining
rules decide as for lines of separate shapes. The lines of the existing
paint-order test are moved farther apart so they still make two objects.
The refusals that ran before the files were read and before a folder was
written stopped Relink and the folder form of Unembed on an image changed
by Perspective Distort or Free Distort, which now keep their corners.
A contour counts as lying inside another only when up to eight of its anchor points do. When the paint check rejects the split with the longest runs, the split with the shortest runs is tried before the shape stays an outline.
The fill check rejects a counter whose convex hull is narrower than three times the outline tolerance in some direction, so a turned strip is caught as well as an upright one, and rejects a shape whose outline is too large to flatten. Exact parts of a split compound are checked at tolerance 0 even when near matches are allowed, so a split that only exact matching found is not accepted under the wider tolerance. The tracking sentence in docs/type-parity.md names its three-glyph condition.