The unpainted rectangle that carries the text wrap options of a symbol
instance, blend, mesh, repeat, placed document, intertwine or envelope
written as a group of its art is now the group's first member. Area type
below the object still wraps by its bounds after reopening, and area type
in the art itself is not wrapped by the rectangle, so art that holds area
type no longer keeps the options on its group and wraps by its members.
A symbol instance written as its art, and a blend, mesh, repeat, placed
document, intertwine or envelope written as a group of its art, wrapped
area type below it by its bounds before saving but by the members of
that art after reopening, because the group carried the text wrap
options. The group now ends with an unpainted rectangle at the object's
bounds that carries the options, as type written as outlines does, and
the group keeps the object's name, transparency, lock and visibility
without options of its own. Art holding shown area type written as
type keeps the options on its group; area type in an envelope does not
count. An object without finite bounds keeps the options on its group.
Without room for the rectangle within the object limit, the options are
left out with the limit's warning.
Each later placement of an image or a colorized image that was turned away at the page limit
was decoding and compressing it again. The scene now remembers what the first placement of a
turned-away encoding adds to the page and leaves later placements out with the same warning
while that still doesn't fit. Once the page has room again, after art is taken back, the image
is encoded and placed as usual.
A subpath's anchors are now an `Anchors` list held in chunks of up to
256 anchors behind `Arc`s. Copying a path copies the chunk table and
shares the chunks, and editing one anchor copies only the chunk that
holds it, so the undo step of a one-anchor edit no longer keeps a copy
of every anchor of the path. Inserting or removing an anchor copies the
chunk it is in and rebuilds the table. Reads and edits follow the Vec
and slice methods the code used; files write and read each subpath's
anchors as one list, as before, within the same anchor read budget.
The undo memory estimate counts only the chunks the other version of
the path does not hold, and the renderer's kept paths compare only the
chunks an edit copied when they look for moved anchors.
Moving one anchor of an open path of 10,000 or 200,000 anchors
(path.moveAnchor, path.setHandle, path.moveAnchors, a nudge) keeps at
most 48 KiB in its undo and redo steps, where it kept 56 bytes per
anchor.
The writer compared the top object's patch with the one the reader makes
of the written grid on an even 9 x 9 grid of places. A split side can
change how the reader samples a short curve that falls between those
places, so a top object could be written live although the reader would
map the contents differently there.
Coons::places gives the places in u and v where the patch's sides have
points. Each side runs straight between them, so the writer now compares
the four sides of both patches at every one of those places, within a
third of the tolerance; a point inside a patch blends its sides and
corners, so the patches then lie within the tolerance everywhere.
A .ai in the legacy PostScript format opened with the box around all of
its art as the artboard, so art placed off the artboard came in on it.
Files opened as .eps keep their page.
- A .ai file read through its layers used the EPS rule from #1102, which
makes the art's bounding box the artboard. It now keeps the artboard
its header gives (%AI5_ArtSize around the center of %AI3_TemplateBox),
with its art outside it. The engine opens a PostScript .ai or .ait
through the new vectorcraft_eps::import_ai; an EPS's private data is
still read as an EPS.
- A .ai of versions 3 and 4 (no %AI5_FileFormat) does not record its
artboard's size. When it has a template box, its artboard is now
VectorCraft's own default, a US Letter page, centered on the template
box's center, which the version 7 specification (section 2.2) places
at the artboard's center. Before, it was the art's box. This also
applies to .ai files other apps write with a template box and no art
size (#1027).
- The center of a template box with a size (a file with a template
image) is now the middle of the box, not its lower-left corner.
A .ai with neither an art size nor a template box keeps its art's box
as the artboard.
When art passes the page limit and is taken back, the writer now drops
every image encoding made while writing it (placed images, colorized
images and freeform fields) along with the cache entries that name
them. Before, only trailing field encodings were dropped, so a placed or
colorized image, and any field encoded before it, stayed in memory for
the rest of the export.
A placed or colorized image whose first placement does not fit under
the limit is no longer encoded into the cache; it is left out with the
existing warning.
The written EPS is unchanged.
Files saved for version 11 write the keys of their text document by name
(/DocumentResources, /FontSet, /StreamTag) and the kinds of its strikes
by their long names (/FrameStrike). The reader found no stories in them,
so their text objects were filled with the page's type in painting
order: type outside the artboards was lost, and type on them could land
in another text object.
The keys the reader uses now get their numbers from the dictionary they
sit in, from the root down, before the document is read. A run whose
style is written by name as a style's number takes that style. Files
saved for later versions that write a newer key by name among the
numbered ones (a font record's VersionString, a paragraph's
ParagraphDirection) have those keys read too.
The last case of an_instance_placed_on_the_canvas_by_an_older_file_stays_live
read an instance of a symbol the file did not define, so it failed for that
reason as well as for the missing template box. It now defines Dot, so it
fails only when the reader places an older instance without a template box.
Objects in an opacity mask's art inside a symbol definition or a pattern
tile are now written with their art styles, as mask art on the layers
already is. A symbol or pattern whose mask art has Offset Path opens with
the effect live in its definition, and its instances and pattern fills
draw as before. Each definition is written with the styled objects of its
own masks only, so art placed as copies inside it is not matched to
another definition's original.
- Mask art linked to a graphic style opens linked to it: the reader's
style linking now goes into opacity masks' art.
- Links in pattern tiles count toward the lost-link warning, the warning
is checked after unused symbols and swatch-only patterns are written,
and links in art left out at the object limit are no longer counted as
kept.
Each piece of a colorized image cut by a Warp effect or an envelope
decoded the image again to work out how much of the color each pixel
shows, although the decoded image was already kept for the pieces that
follow one another. The writer now keeps the coverage next to the
decoded image, for the same data and type, and works it out again only
when the image changes. The file written is unchanged.
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.
Type on an open path can now start before the path's start: its start
is stored below 0, the span runs from there, and the characters whose
middle falls before the path's start are not drawn, as SVG 2 lays out
text on a path (https://www.w3.org/TR/SVG2/text.html#TextLayoutPath).
The text keeps every character, and the start bracket stays at the
path's start. Past the path's end, text that does not fit is overflow,
as for other type on a path. Type that starts on the path draws every
glyph as before.
- SVG import keeps a <textPath> start before an open path's start
(text-anchor end or middle, or a negative startOffset) instead of
starting the text at the path's start, which drew every character.
- SVG export writes it as a negative startOffset.
- PDF export writes only the characters drawn on the path.
- The legacy .ai and .ai editing data writers write the type from the
path's start with the type attributes warning.
- type.pathOptions takes a start below 0 for type on an open path; on a
closed path it is the path's start, as before. A flip starts the type
at its start bracket. Dragging the center bracket slides it from where
it starts, and no further before the path.
- A click at the path's start places the caret by the first drawn
character, and the caret in the hidden characters stands at the
path's start. The highlight of substituted fonts and glyphs leaves
them out.
- Release Type on a Path keeps the first drawn glyph where it was
drawn, with the hidden characters before it.
- The Touch Type tool shows no box for a hidden character, and
text.touchType returns an error for one. A character with a drawn
glyph is changed by that glyph.
Docs: docs/mcp.md, docs/target-app-parity.md.
Opening an .ai graph now sets placed_art from the art as read (main's d3789f2b0c), so the comparison in the graph round-trip tests leaves it out, as it already leaves out placed.