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.
The plug-in runtime keeps main's JavaScript plug-ins beside the web worker's module bytes and checked loads: a JavaScript plug-in's bundle is kept for the worker like a module, and load_checked loads it from its bundle.
A side of an envelope's content shorter than 1e-6 pt, not only one of
zero length, has its margins measured as shares of the other side
(envelope_margin_lengths). docs/mcp.md, the object.envelope.info params
text and the bounds_margin doc comment now state that threshold.
- Redefining a text style keeps text with its own value of an attribute the
old definition did not set. Only text that still had the value it had
under the old definition (Normal's, or the default when Normal itself is
redefined) takes the new one. Leadings that Block gave the text still
follow the style.
- Use Profile Defaults and Load Character Styles draw the graphs in the
symbols they add with the document's own graph design of that name, as
Paste does.
- file.newProfiles commands say their name is a built-in category of
file.newPresets, and Use Profile Defaults records no undo step when the
document does not change.
A stored plug-in that didn't install, for example because its load
panicked or its module is broken, was only written to the log. The
person could not see it or load it again without restarting.
- plugin.list gains failed: [{file, error, from}], the plug-in files
that didn't load in this process: those of the Plug-ins folder, and
those the folder report of the Additional Plug-ins Folder (or the
folder plugin.reload loaded last) lists as failed. Disabled plug-ins,
files turned off since they failed, and modules skipped because
another install or removal of their id came first are left out. A
file that both loads list is listed once, as a stored file. A
plugin.reload replaces only the folder's rows. Installing or removing
a plug-in whose module is in a stored file that failed, or a later
load that installs it, takes the file off the list.
- plugin.retry {file?} loads one of those files again, or all of them,
with the same checks as the load it failed in, and reports for each
whether this retry installed it. A folder file's row in the folder
report moves to loaded or keeps its new error. Under automation read
roots, a file outside them is not read again, its row stays listed,
and the reply names it and its folder by their names. Safe Mode
returns an error.
- plugin.setEnabled {file} also takes the name failed gives a file
outside the read roots.
- Object › Plug-ins › Plug-ins That Didn't Load… lists the files with
why; Retry All loads them again under the read roots the list opened
under, and the status bar says how many loaded. The item is disabled
while nothing failed.
- A command.batch that runs a filter and then retries a module with
its id turns Apply Last Filter off, as a reinstall does.
Docs: docs/plugins.md (Plug-ins that didn't load), docs/mcp.md.
document.export and Export As write .cmx exchange files with 32-bit
coordinates through craft-cdr's write_cmx, in the layouts the .cmx
reader reads. The chosen artboard is the file's page, or with Use
Artboards each chosen artboard is a page of one file, and each layer with
art on a page is a layer of that page.
- vectorcraft-metafile gets painted_layers: the WMF writer's walk of the
visible art, layer by layer, with each fill's and stroke's solid paint,
its miter limit and the swatches of the document and of the documents
it places.
- The export keeps CMYK, RGB, gray, spot colors at their tints and
Registration; type is written as outlines, and gradients and patterns
as one color. The warnings name images, clipping masks, transparency,
art past a page's edge, dash offsets, dashes aligned to corners, miter
limits, and each loss the writer reports: nonzero fills written
even-odd, long paths, rounded dashes, shortened names, low spot tints,
and spot colors without a name or a known color.
The plug-in store turn, the Data Recovery area hold, the script grants
lock and the hang report file each released their file lock only by
closing the file. The lock stays held while any copy of the handle is
open, and a child process that any thread starts holds a copy until it
runs its program. While one was starting, the next turn on the plug-in
store waited, an app found its own recovery area busy, a grants change
timed out, and the next launch left a hang report alone.
Each holder now unlocks the file when it is dropped, as #9837 does for
the nightly session and the GPU start file. The engine's three locks
share one type, `store::LockedFile`. A left hang report that a launch
locks to read is held the same way.
Each new test keeps a copy of the handle open, drops the holder and
takes the lock again.
- A panic while a held run's output is applied ends the run, so the
documents go back to their state before it, and ending a held run
drops the output handed in for it.
- The worker loads a plug-in with the limits the page sends with the
run, so its memory limit applies.
- A worker that is ready only after the run's deadline is not sent the
run, with or without a dialog open.
- A run that holds the documents and fails while a dialog is open ends
at once and frees them.
- A plug-in command's dialog that automation confirms runs the command
on the page and returns its result.
- A plug-in file opened or dropped on the web whose worker check fails
is reported in the Can't open dialog, not only in the status bar.
- The web README lists connect-src among the CSP directives the app
needs.
file.newProfiles.applyDefaults {name} gives the active document the
Default Graphic Style and [Normal Character Style] of another category's
New Document profile, as one undo step and none when nothing changes. The
swatches, patterns, symbols and brushes the profile's style paints with
come along, its colors are converted to the document's color mode, and a
composite font the profile's default font names replaces the document's
of that name. Objects still linked to the Default Graphic Style and type
in [Normal Character Style] take the new definitions and keep their
overrides, as the Redefine commands do. New art and new type then start
with the profile's look. This is VectorCraft's own command.
- Document Color Mode now converts the fill and stroke of character and
paragraph styles as well, so a document or profile switched between
RGB and CMYK no longer keeps style colors in the old mode.
- Art pasted again with an SVG filter that was renamed on the first paste
takes the same name, instead of a new name on each paste.
Refs #8350
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.
Clear, Ungroup, a script or any other edit that removed the isolated
object left isolation mode on an id that was no longer in the document.
Session::edit now ends isolation mode after every edit that removes the
isolated object, as Undo and Redo already did. While a symbol is edited,
removing a group isolated inside the symbol's art isolates the editing
layer again, as Exit Isolation Mode from that group does.
The paths that put an earlier document back now put isolation mode back
with it: a canceled undo group, a canceled undo scope that joined an open
group, an interaction's next preview or cancel, and the measured deferred
preview. When the edits they take back had removed the isolated object,
that object is isolated again.