File › Open and File › Place read layered raster .pcraft documents
through craft-doc and store them as one PNG, sized by the document's
resolution. A placed file links like any image.
- The image is the file's full-size composite when it has one.
- Without one, the layers are combined at the canvas size when the
document is RGB at 8 or 16 bits and every visible layer is a raster
layer that blends Normal, with no clipping, layer effects, vector
mask, frame, advanced blending or feathered layer mask. Hidden layers
are not read, and an RGB ICC profile the document names is kept.
- Otherwise the composite preview comes in at the canvas's size, and
Open, Place, links.update, links.relink and links.replaceEmbedded
warn when it has fewer pixels than the canvas, naming both sizes and
why the layers were not combined.
- A full-size composite or preview the file names but doesn't hold,
can't decode or, for the full-size one, of another size than the
canvas is an error. The Links commands decode the kept PNG before
taking it.
The import fuzz tests cover mutated bundles and manifests.
A click on a path's direction handle picks it, a Shift-click adds it to
the picked handles or takes it away, and Escape lets them go. Picked
handles show ringed. Dragging one of two or more picked handles moves
all of them, on one path or several, by the same offset in one undo
step. A Shift-press on a handle reshapes only once the pointer has moved
3 pixels, so a Shift-click leaves the handle where it is.
The new command path.moveHandles does the move: an anchor with one
handle listed places it as path.setHandle does, an anchor with both
listed moves both and becomes a corner, and independent (Alt during the
drag) makes every listed handle's anchor a corner.
Docs: docs/mcp.md, docs/target-app-parity.md.
A .ai file's editing data can include a placed EPS file's bytes between
%%BeginDocument: and %%EndDocument. The reader did not read those bytes:
in the %AI5_BeginPlace form the placed file showed only the preview the
data keeps of it, or an unread placeholder box without one, and in the
version 7 form the art the file draws came in as editable paths with a
note that placed files weren't read.
- The reader keeps those bytes (up to 256 MB) and makes the placed file a
placed document of them, in the file's bounding box where the
matrix puts it. It draws its art whether or not its file is found, and
a native save keeps the bytes. The version 7 form's placed EPS art is
no longer editable on open.
- A placed file stays as before when its bytes are a DCS file (File >
Place makes those linked images), have no bounding box of their own,
carry a VectorCraft document (as VectorCraft's EPS export writes),
don't read as an EPS file, or belong to a file named .ai or .ait.
What reading the bytes warns of is in the open result.
- One with a preview that an image variable binds stays the linked image
showing its preview, as a placed PDF page does.
- The link takes the size and hash of the bytes, so a file found unchanged
is neither missing nor modified.
- Drawing and the open check each read at most 8 placed EPS files inside
one another, so a file whose included files include others opens.
The open check draws the placed documents inside the bytes from their
previews, and it reads each included file once at each depth. A file
nested 12 levels deep opens with at most 8 drawing reads and 72
checks.
- File > Package with Copy Fonts reads the type of a placed EPS file, as
it reads a placed PDF page's, and of the EPS files it includes in turn,
pattern art included.
- On %_ lines the %_ that starts each line is taken off. Then one line
end is taken off the end of the bytes when another line end comes
before it: the one the %%BeginDocument: line ends with when the bytes
end with it, otherwise the last one. An LF after a CR is kept with it
when the file's first line ends with CRLF.
Docs: docs/target-app-parity.md.
Six engine tests guarded against quadratic or unbounded work by timing
it (under 2, 10, 30 or 60 seconds) or by printing how long it took. A
slow or loaded machine could fail them, and a regression that stayed
under the bound passed. Each now counts the work the guarded code does
and compares it with a smaller input or with the code's own limit:
- An unknown command id or parameter key of 200,000 characters compares
no more characters than one of 20 (edit-distance cells).
- A Word .doc with 20,000 hidden paragraphs reads at most one more Prl
per paragraph than one with a single paragraph, and each style's
properties are read once.
- One function-based shading filling 5,000 paths takes no more function
evaluations than filling one, and twenty stay within the import's
evaluation budget.
- A form decoding to 64 MiB drawn 1,000 times is walked no further than
the page's form-content limit and one more form.
- A blend of 998 steps measures no more laid steps per object than a
blend of 3, and one of 1,500 steps is not laid out.
- Retype of a tracked line of 450 glyphs lays out at most 20 times the
glyphs a line of 45 does.
The counters are test-only: thread-local cells in the engine under
cfg(test), and in vectorcraft-pdf (read-count feature) and
vectorcraft-eps (new work-count feature), which the engine enables in
its dev-dependencies only. Retype's layout calls go through one helper
that counts them.
script::folder::list and script::startup::list measured the 250 ms
listing limit (MAX_SCAN) with a real Instant. script.listInstalled,
script.startup.run and the File > Scripts menu read the folders through
them, so a test that went through any of these got a truncated listing
and missing scripts whenever the disk stalled for 250 ms.
- folder::Clock is either Wall (the real time since the listing started,
the default) or Fixed (the same time at every check). Both list
functions take one.
- Session::set_script_listing_clock sets the clock the two commands and
the menu's listing job use; the app keeps the real clock.
- The script folder, startup script, scripts menu, script run and Safe
Mode tests list with a fixed zero time, so a slow disk cannot cut a
listing short. Direct listing calls use the test file's list helper.
- New tests check that script.listInstalled, script.startup.run and the
menu stop at the session's clock once it is past the limit and list
everything at the limit.
a_cancelled_export_stops_the_exporter cancelled from another thread after
a 300 ms sleep and asserted the elapsed time. The exporter now reports one
step before it loops forever, and the test's progress sink cancels the
token when that report arrives. The cancel lands while the exporter runs,
and the test asserts Err(Cancelled) and that the report arrived once. With
the cancel check between budget slices removed, the export ends at its
instruction budget instead and the test fails.
A copy of a clip group's clipping path kept its clipping mark when pasted
outside the group, so Offset Path and the other path commands skipped it
and Offset Path's OK did nothing. Paste now clears the mark, and Release
Clipping Mask clears it on a selected path that clips nothing, which
repairs paths pasted before this fix.
Keep XMP file buffers in native state and release them at the file run boundary. Count registered namespaces and expanded metadata against the heap limit. Reset marked readers after updates and allow failed library setup to retry.
Use the grouped picker in the effect dialogs and Appearance editor. Validate new automation requests while preserving earlier spellings, recorded steps, and untouched stored modes.
A startup script refused before it begins, such as with an undo group
open, is named in the Script Console. Stopping the runs from the quit
prompt between two queued runs drops the runs not yet started, and the
status bar says so. While that prompt is open, or before its answer is
taken, the next run does not start.
The contrast row, its menu rows and its tests move to the craft UI framework,
as main's Color Wheel panel now uses it:
- The row is a Row with a Swatch named Background (a color well whose value is
the background's hex value) and Text for the ratio and the AA and AAA
results, each with the WCAG minimums as its tooltip.
- Show Contrast, Contrast For and Contrast Background are rows of the panel
menu's items (ui.colorWheel.contrast, contrastFor.<id>,
contrastBackground.below and contrastBackground.current), after Show
Opacity. Current Color is gray, and its row answers an error, while the
active proxy has no solid color.
- The kept background and ratio answer are fields of WheelUi instead of panel
state. The answer's key also holds whether the Live Paint Bucket paints,
which changes the proxies' paint without a document revision.
- The row's tests run in the panel's Fixture by accessible name; the drag test
runs an interaction whose previews set the fill, as the Show Document Colors
drag test does.
- The settings lists in the params text, docs/mcp.md and the tests take both
opacity and the contrast keys.
script.startup.run checks then's parameters as script.run checks them,
before any startup script runs. In the app, the message of a startup
script that fails or is stopped, through the quit prompt too, stays in
the status bar's notes after the chosen script ends.