Saving a .ai file resolves the font of every run of type twice: once
for its font record and once to check that the font comes back as
itself. Each resolution looks the face up, reads its axes and name
table, and scans the loaded faces by PostScript name, so a document
with tens of thousands of runs in a few fonts repeated the same
lookups for every run.
The text document now keeps what each style's font fields (family,
style, version and Variable Font settings, each setting by the bits of
its value) resolve to for the whole save, and reuses it while the font
database's generation is unchanged. A font added or loaded during the
save resolves it again. The font set is still searched and filled as
before, so its order, indices and rollback are unchanged. The output
is unchanged.
- Tests: a save resolves as many fonts for one row of type as for
four; the program, header, warnings and private data are the same as
with every run's font resolved again (many fonts, threaded type,
envelopes of type, and type taken back when an envelope is written as
its art); each resolved record and check equals the uncached one for
static and variable fonts, settings outside the axis range, not a
number, +0 and -0, and a missing family, and a value resolved before
the font database changed is resolved again. An ignored test times
the save of 10,000 point type objects in three runs over four fonts.
Saving a .ai file checks every art style it writes by reading it back
with the reader's style parser. Each object check parsed its style text
twice (once to read the appearance and once for the outline check), a
brushed style a third time, and a linked object first searched every
written style by name and copied its text. With thousands of objects
on a few styles, the same text was parsed tens of thousands of times.
The writer now keeps each style text's parse for the whole save, a
text the reader does not parse included, and reads it on each object:
the object's own gradient, the outline check, the brush check and the
appearance comparison still run per object. The own gradient is applied
to a copy of the parse, and that copy is the compared appearance; the
outline and brush checks read the kept parse.
Panel styles are found by their place in the written list. The output
is unchanged.
- import: parse_art_style, read_parsed_style and parsed_moves_with
split the parse from the reading; BrushesRead::style_reads takes the
parse.
- Tests: the parse count of a save does not grow with the number of
objects on the same styles; the program, header, warnings and private
data are the same as with a parse at every check; one parse read on
two objects gives each its own gradient. An ignored test times the
save of 40 graphic styles, 20,000 linked rectangles and 5,000 paths
with their own Outer Glow.
A damaged .ai can give a gradient mesh whose outline is enormous but finite.
draw_mesh_raster flattened that whole outline in device pixels (grown_outline),
and kurbo's flatten then asked for more segments than memory holds: a
"capacity overflow" panic (seen in import_fuzz's ai_written_meshes_never_panic).
An outline wider or taller than 2^24 device pixels now goes to the per-quad
drawing path the function already falls back to.
A third quick click on a swatch counts as a triple click, and so does
each quick click after it. Those clicks still applied the swatch, so a
triple click on a pattern swatch opened pattern editing and then
painted the tile art with the pattern itself. Only the first click of
a run of quick clicks now applies and selects the swatch.
The test now sends four quick clicks and gives the art a solid fill in
each view, so the list view's first click is checked on its own.
Running a script or a plug-in now ends the spot color base's link, as a
batch step already did, so a script that deletes the spot color and makes
another of the same name does not make the new one the base. Commands that
only list scripts or plug-ins keep the link.
While the link waits for an Undo, the color it captures before a command is
the one the guide shows, not that of a new spot color of the same name.
The second click of a double-click on a swatch also counted as a plain
click. After the double-click opened pattern editing, which selects the
tile art, that click applied the pattern swatch to the tile, so the
pattern held a copy of itself. The second click now only opens the
editor; the first click still applies and selects the swatch.
Reported by erolkarino. #7164 by mockydevs makes the engine refuse
painting the tile with its own pattern; this change stops the swatch
panel from sending that paint on a double-click.
The Enclosing Lasso Tool joins the Lasso group in both shipped
toolbars, right after the Lasso, and stays in Object › Plug-ins ›
Enclosing Lasso. The All Tools drawer lists it once, under Select, and
Edit › Keyboard Shortcuts › Tools lists it once. It has no default
shortcut, and the Lasso keeps Q. A toolbar the user already edited
keeps its saved layout; Reset Toolbar adds the tool.
Fixes#6117
A printer name in "Sent “{title}” to {to}" was translated as a message of
its own, so Korean's "{status} ({e})" row turned "Office Laser (Floor 2)"
into "Office Laser(Floor 2)". An unquoted `{to}` value is now translated
only by an exact row, such as "the default printer"; a quoted one stays
as written. The cross-language case uses a printer name with
parentheses, and two quoted `{to}` names that match exact rows.