Some SVG readers draw a masked group only inside the bounding box of its
shapes. A drop shadow, glow, blur or feather inside the group paints past
those shapes, so these readers left it out, while others drew it.
A masked group now starts with a rectangle over the mask's region,
unpainted (fill="none") and hidden (visibility="hidden"), when what it
holds has a visible raster effect: on a member at any depth, on a fill or
stroke, in a symbol's art, or in the art a blend or other live object is
written as. The rectangle widens the group's bounding box without drawing
anything, and import leaves it out. The masked groups of a knockout group
get the same rectangle when an element inside them has such an effect.
Other masked art, brushed strokes included, is written as before, and so
is an object whose own effects are written outside its mask.
Tests: a_masked_group_spans_its_region_when_its_art_paints_past_its_shapes
and a_knockout_group_spans_its_masks_when_an_element_paints_past_its_shapes
in crates/svg/tests/it/blend_export.rs.
A .ai path with an Art brush opened with the brush on its stroke only
when the brush stretched its art at 100% in Tints, unflipped. Paths with
an Art brush in None, at another fixed width, with Stretch Between
Guides, or flipped along or across now open as the path with the brush
on its stroke too, and the brush in the Brushes panel has those options.
The guides come in as fractions of the art, from the lengths of the art
outside them. A brush with Scale Proportionately comes into the panel
with that option, and its paths keep their drawn look.
Paths keep their drawn look when their settings that change the drawing
differ from the brush's, and when the brush is in Tints and Shades or
Hue Shift, has a width that follows the pen, has guides that leave no
art between them, or has a Spacing, Adjustment or FoldAdjustment other
than 0, 1 and 1.
The .ai save writes the same options, so such brushes and the paths
that use them come back as they were; a path with a proportional brush
is written as its brush's art.
A path's own lines can be followed by samples of the pen
(`(…) Xt n XD`). The reader took them as the end of the object, so the
style marker after them was not matched: the path came in as its drawn
look plus a second, unpainted copy of the path, and no note said the
look was kept. The samples now stay with the path. They aren't read,
so a path that has them keeps its drawn look alone, with the note, when
a setting of its Calligraphic brush varies with the pen (Pressure,
Tilt, Bearing or Rotation, with a variation above 0). With any other
style, an Art brush or a Calligraphic brush that doesn't follow the
pen included, it takes the style as it would without them.
A Calligraphic brush's filter with an entry the reader doesn't know, or
with a variable width, keeps the drawn look too, as an Art brush's
filter does.
Docs: docs/file-format-parity.md, docs/gaps.md.
A straight `(N) *` guide path that runs across the canvas or an artboard
opens as a ruler guide, but a hidden one (`1 Xw`) stayed a guide path.
It now opens as a ruler guide too, and every ruler guide made from such a
path keeps the path's hide, lock and name, so its Layers row shows them.
Before, a locked guide opened unlocked and a named one lost its name.
Hidden or locked guide paths that are short, slanted, grouped or `(S) *`
stay guide paths, and commented copies (`%_`) are still left out.
Docs: docs/target-app-parity.md, docs/file-format-parity.md.
A straight compound path with Twist was read live up to 180° whatever
guides it held, and the live Twist was measured from bounds that take in
the guide members. A straight compound path with Twist whose guide
members reach past its other members now opens as its drawn look
instead of live, and so does a compound path made only of guides.
Compound paths whose guides lie inside their other members, a Twist of
0°, and single paths keep opening live.
The `.ai` writer keeps a graphic-style link only where the reader reads
the style live, so such an object is now written without the link, with
the existing style-link warning.
A PDF-compatible .ai saved with Include Editing Data for Other Apps
wrote no text wrap options, so a wrap object opened from the file no
longer wrapped type. An object with only wrap options got no
dictionary at all.
The writer now writes each wrap object's options in its dictionary as
`AI11TextWrapOffset` (`/Real`) and `AI11TextWrapInvert` (`/Bool`, 1 or
0), the entries `text_wrap` in crates/eps/src/import/ai/read/document.rs
reads, beside the object's name, variables and opacity mask.
- The offset is the one in the art's space, so on a large canvas it is
written at 1/10 and read back at its size. An offset that is not
finite is written as the default 6 pt, and one past the -1000 to
1000 pt the reader keeps as the nearer end of that range.
- Art the writer draws for an object (a blend's steps, a symbol
instance written as its art, a brushed stroke's pieces, pattern
tiles, an object's drawn look) is written without the options of the
objects it is made from. The object itself and a symbol's own art
keep theirs.
- A clipping path written as its fills and its strokes has its options
once.
Docs: docs/file-format-parity.md, docs/target-app-parity.md.
A legacy .ai graph (%_Gs ... %_GS) opened as plain art, with its table,
type, axes and settings left out. A grouped column, stacked column, line
or area graph now keeps them on its group when every record has the
shape and values the version 7 specification's appendix A gives, the
table holds at least one number, the drawn art strokes the plot's left
and bottom edges, and each series group is tagged once as a whole
column, holds only paths and paints them with one fill and one stroke.
The saved art stays as it is on open; Graph Data redraws the graph from
its data afterward, with each series' fill and stroke kept.
Any other graph (pie and scatter graphs, designs, customizations, record
shapes of later versions, tables past 10,000 categories, 256 series or
2,600,000 cells) keeps its art as plain objects with the existing note.
Saving a graph to .ai, in either form, now warns that its data and
settings are not written.
A path or compound path with straight segments and nothing stroked was
read with its Twist live at any angle. It is now read live up to 180°
either way, a limit VectorCraft sets, and one twisted further keeps the
file's drawn look, as curves and groups already do past 90°.
The .ai writer keeps a graphic-style link only where the reader reads the
style live, so a straight object twisted past 180° is now written without
the link, with the existing style-link warning.
Docs: docs/file-format-parity.md, docs/target-app-parity.md.
Legacy .ai type (version 7) now reads the operators it used to skip:
- `autoKern kernValue Tk` (and `TK` in overflow text) sets the manual
kerning of the character before the pair, or at the start of a line
the space before the line's first character; autoKern 1 sets the
pair back to automatic. Values are kept to -1000..10000.
- `T+` and `T-` (discretionary hyphens) become soft hyphens.
- `languageID XL` sets the characters' language (ids 0 to 11).
- A visible text object read while a line breaking value (`TG`) or
Japanese layout rules (`Xu`, `Tu`) are set opens with a warning,
once per file for each.
Final-form positions (Tc, Tw, Tm, Td, T*, TR) stay ignored.
Legacy .ai saves now write manual kerning as `0 value Tk` after each
character that has it and before a paragraph's first character with
space before it, and soft hyphens as `T+`; manual kerning is no longer
listed among the attributes left out. The writer's prolog defines Tk
and T+.
Docs: docs/file-format-parity.md, docs/target-app-parity.md.
Two findings in the review of #7146, in how layers whose differing
objects come in as the page's art treat envelopes of type:
- The envelopes of type the page holds against the layers were weighed
on the layers as read only, and that choice was also applied at the
placed files' other placement, which can move a placed file over or
under an envelope. Each placement is now weighed on its own. The
places of those left live, for layers that open alone, still come
from the layers as read: a .ai that opens alone has no other
placement.
- A placement that draws as the page with only the held envelopes put
back was dropped, as nothing in it differs for its objects to come in
as the page's art. It is now used as it is, as layers that draw as the
page with every live envelope's drawn art put back already are. The
try with every envelope of type put back keeps its order: objects
that differ come in as the page's art, as before.
Part of #7141.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the layers with their live envelopes didn't draw as the page, and
didn't with the drawn art of every live envelope put back either, every
envelope of type got its drawn art back wherever the layers were still
used: the editing data trusted, the objects that differ coming in as
the page's art, or a .ai whose layers would open alone opening alone.
Art that differed anywhere on the page cost every envelope of type its
editable type, though putting its drawn art back changed nothing.
Now each envelope of type is weighed in the page check's own drawing,
on the pixels that it and its drawn art ink (the two drawn together on
a layer of their own, without the rest of the layers). It keeps its
drawn art and hidden type where the layers with it differ from the page
in more of those pixels than its own check allows against its drawn art
(10%, or 3% with all their neighbours), or where the envelopes that stay
live would together differ there in more of a page than half of what
the page check allows (a budget of its own, the same size as the one
their own checks share). Art differing on its pixels still holds it.
It also keeps its drawn art, as before, where the layers don't draw it
where it is and as itself, on the page or off it: under a clip or an
opacity mask, in a group with an appearance of its own, or in another
envelope, a repeat or a blend. Another envelope on no page stays live,
except on a page that holds all the art (an EPS's art box), where one
reaching past the page keeps its drawn art. Past 12 on the pages, all
keep it.
A .ai whose layers would open alone still opens alone: its envelopes of
type are settled again as they were with the page, in the same order
and with the same checks, so each that opens live draws as it was
weighed, and those the page held get their drawn art back. Where the
differing objects are to come in as the page's art and can't with
envelopes of type live (an object that holds type isn't replaced),
every envelope of type gets its drawn art back and that is tried again,
as before. Where putting back the drawn art of every live envelope
makes the layers draw as the page, it is still put back.
On 224 of our own files (used locally), envelopes of type that open
live go from 174 to 186 in 8 files, none fewer; no file changes between
its layers and its PDF part.
Part of #3179.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A top-object envelope gives each piece of a side a share of the content
in proportion to its control polygon's length. When anchors split a
curve without changing its shape, the pieces' polygons don't divide the
side where the curve's own parameter does, so the envelope bent its
contents differently although its outline was the same: Add Anchor
Points on a top object moved the art, and a top object whose .ai mesh
saves each side's curve split into thirds drew its type up to about
half a point off its drawn art, which follows the whole curve's
parameter.
Coons::from_top_object now checks whether a side's pieces, from corner
to corner, are all pieces of one cubic. The pieces' spans of that
curve's parameter come from the handle lengths either side of each
split, the curve from the outer ends and handles, and every piece must
lie within 0.02 pt of the curve's piece over its span (each control
point). Such a side runs along that curve, by its parameter. Any other
side keeps the polygon shares, including a side only partly made of one
curve and a smooth side drawn in many pieces that isn't one curve as a
whole. Corners found from the outline can still move when anchors are
added, as before. Gradient meshes made from a path are unchanged.
Existing top-object envelopes with such sides redraw.
a_split_curve_moves_the_top_object_share_to_its_new_anchor, which
pinned the earlier behaviour, becomes a_split_curve_keeps_the_top_object_patch.
Tests: a_split_curve_keeps_the_top_object_patch,
a_top_object_joins_a_split_curve_saved_with_rounded_coordinates,
a_top_object_keeps_smoothly_joined_curves_apart,
a_top_object_side_partly_of_one_curve_keeps_the_polygon_shares and
a_top_object_side_of_many_arcs_stays_on_them (vectorcraft-doc),
envelope_top_object_keeps_its_look_when_anchors_are_added
(vectorcraft-engine) and
a_top_object_whose_top_is_one_curve_split_in_thirds_opens_live
(vectorcraft-eps).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
File > Open and File > Place read QuickDraw pictures, versions 1 and 2,
from .pct, .pic and .pict files, with or without the file's 512 bytes
of application data; a version 2 picture also opens by its content.
The reader plays the opcodes of Apple's Opcodes in Pictures table on
the metafile player: lines, rectangles, rounded rectangles, ovals,
arcs, polygons and regions become paths, text becomes point type in
the font the picture names, bitmaps, pixel maps and QuickTime JPEG
images become images, and the clip region clips what follows it.
Place puts the picture in one group clipped to its frame. What isn't
read comes back as warnings, and a picture cut short keeps what came
before it. PICT is not written.
Images whose transform flattens them no longer leave their pixel data
in the document. Formats whose signature starts the file are detected
before PICT, which is known by bytes 522 or 10.
Docs: docs/mcp.md, docs/file-format-parity.md, docs/target-app-parity.md.
Type read from a text document's font record was set in whichever installed
face first answered to the record's PostScript name (ignoring case and
punctuation), and its family was then swapped for any available family
spelled alike but for case and punctuation (`FontDb::find_family`): a record
naming `SampleInk`, the PostScript name of `Sample/Ink`, set its type in
`SAMPLE INK`. Copies of one family and style under other PostScript names or
versions were not told apart either, so the type could set at other widths
than the file's own page.
- `named_font` / `document_font` (crates/eps/src/import/text.rs) give the
family and style of the installed face of exactly that PostScript name,
else one that differs only in case or punctuation, and name its version
when the family and style alone resolve to another installed copy.
- The font record's key 5, its version string (name ID 5), is read and picks
that version among the faces of the name. Each record is resolved once.
- `FontDb::postscript_faces` lists every installed face a PostScript name
answers to, loading their families; the import prefers among them one of
exactly that name.
- Type a PostScript program sets (EPS import) and legacy .ai type take the
face of their font's name the same way.
- The .ai save writes a static font's version (`/5`) when its PostScript name
alone would give the reader another installed copy (another version, or the
same name in another family), keeps the version in the style it compares,
and checks that the type comes back in the same family, style and face,
taking the record's version as the reader does (up to 256 bytes), so such
type round-trips without a note.
Measured on 224 users' files (used locally, never committed): 16 files set
some type in another face; 12 render differently against their own page,
10 closer and 2 further by 0.03% of the page; envelopes of type that open
live go from 154 to 159, none fewer in any file; no file opens another way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>