.ai import: symbol instances in older files are read, so art outside the artboard opens

Files saved for versions 10 to 13 place each symbol instance with a
TransformMatrix. On the page it takes the symbol's art to the canvas
(y down); in a symbol's art, it takes the art to that symbol's space. The
reader only knew the RTransformMatrix of newer files, so any such
instance made the editing data unreadable, and the file opened from its
PDF part alone, which holds only the art on the artboards.

The reader now converts a TransformMatrix with the canvas point of art
space's origin that the template box gives. A file whose symbol
instances were the only part it could not read now opens from its
layers, with the art outside its artboards.

The symbols fuzz test also damages the same data in the older form.

Docs: docs/target-app-parity.md, docs/file-format-parity.md.
This commit is contained in:
dotCooCoo
2026-11-14 17:03:22 -08:00
parent dafd993395
commit a3ac628576
7 changed files with 161 additions and 8 deletions
+2 -1
View File
@@ -190,7 +190,8 @@ private editing data. VectorCraft:
14; #868: round trip with Illustrator 2018 loses layers and groups), some files 4× slower to open since the
editing data is read whole (#758), live effects that are not read or have settings that are not read, and
brushes come in as their drawn look (#637; pattern fills are read since #1025, and symbols and their instances
open live, as do the symbols of a symbol library without layers); legacy `.ai` without the prolog opens since #1027, its legacy type (`To` … `TO`) since #868; guides
open live, those that files of versions 10 to 13 place with a `TransformMatrix` included, as do the symbols of a
symbol library without layers); legacy `.ai` without the prolog opens since #1027, its legacy type (`To` … `TO`) since #868; guides
open as ruler guides and guide paths since #5057 (#779), hidden, locked and named ruler guides with their state.
Type under a Warp effect is compared with the art saved with it: type that draws as that art stays editable with
the effect live, and type that draws differently, or that the file's limit of checks has no check left for, opens
+1
View File
@@ -1795,6 +1795,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
In `.ai` and EPS editing-data import, a clipping group, layer or opacity mask's art with several clipping paths (`W`) clips to their intersection: each clipping path after the first clips a clipping group nested inside the one before it, and each keeps its own stroke and transparency. A compound path of clipping paths (`*u` … `*U`) is still one clipping path, and clipping paths that would nest the art past the document's 32 levels stop the editing data from being read (`crates/eps/src/import/ai/tests.rs`).
`.ai` and EPS editing-data import keeps template layers, and opens canvas and artboard ruler guides as ruler guides on their layers; guide objects stay editable guide paths (#779; `crates/eps/src/import/ai/tests.rs`, `crates/eps/src/import/tests_native.rs`).
A hidden (`1 Xw`) ruler guide path in `.ai` and EPS editing data opens as a hidden ruler guide rather than a guide path, and every ruler guide keeps its path's hide, lock and name, so its Layers row shows them (`hidden_locked_and_named_guide_paths_are_ruler_guides`).
`.ai` editing-data import reads symbol instances that files of versions 10 to 13 place with a `TransformMatrix` on the canvas, on the page and in a symbol's art, so such a file opens from its layers with the art outside its artboards instead of from its PDF part alone (`an_instance_placed_on_the_canvas_by_an_older_file_stays_live`, `an_older_ai_files_symbols_keep_its_layers_and_the_art_outside_its_artboard`).
`.ai` and EPS editing-data import keeps each path's Attributes panel note (`%AI3_Note:`, `%%Note:`, more lines in `%AI5_NoteMore:`, up to 1,024 characters) and Show Center (`1 Ap`); a note or Show Center applies to every path after it until the next one, and a note before a group or compound path is not theirs (`crates/eps/src/import/ai/tests.rs`, `crates/eps/src/import/tests_illustrator.rs`).
`.ai` and EPS editing-data import reads object tags (`/identifier (string) XT`) on the object before them, whatever kind of object it is: `AdobeURL` becomes the object's URL, and every other tag is kept in the object's data in order, up to 64 per object; a tag longer than 64 KiB, and tags in a pattern's or brush's art, are ignored. A tag on art that shows no longer stops the editing data from being read, and brush art that holds tags is read (`crates/eps/src/import/ai/tests.rs`, `crates/eps/src/import/tests_illustrator.rs`).
A `.ai` saved without PDF compatibility (its PDF part only a placeholder page) is placed and pasted from its editing data, as it opens: File › Place places the art of the layers that show on the first artboard (`file.place`'s `page` places another one), and Paste of it as PDF data (`clipboard.importPdf`) takes every object. `document.open` with `pages` naming every page of such a file opens it the same way (`crates/engine/src/cmd/fileio/tests_aiimport.rs`).