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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
`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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
- 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.
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.
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.
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.