Instances of a symbol whose art has live effects are written as that art placed by each
instance, so a named object in the art appeared once per instance with the same node id and
the same XML id. Symbols' art now takes no name ids, as in an instance that has its own copy
of the art; the instances keep theirs.
EMF, WMF and SVG wrote a symbol instance from its symbol's art as stored,
so live effects inside that art were missing: a square moved 100 pt by a
Transform effect stayed in place in the file while the canvas drew it
moved. Art whose own place is off the artboard was left out even when
the effect moved it onto it.
These exports now call bake_document_placing_symbols, as PDF, print, EPS
and DXF do: each instance of a symbol whose art needs baking is written
as that art placed by the instance and then baked, so an instance that
scales or turns its art does not scale what its effects do. EMF and SVG
clip 9-slice cells and WMF does not, as each places other instances. In
SVG those instances are written as groups; instances of symbols without
such effects still share one <symbol>. Preserve Editing still embeds the
document with its live effects.
WrittenLayers gains hidden_objects. SVG sets it with Hidden Layers on,
since it then writes hidden objects too, so a hidden instance is written
hidden with its effects applied. The other exporters leave it off.
An SVG instance nested in another instance's art was shared through
<use> when the def allowed its own transform, while the <use> writes
that transform after the outer instances'. A stroked symbol nested in a
scaled instance then drew its stroke at double weight. The check now
uses the transform the <use> writes.
In horizontally scaled type, live SVG text stretched the character a
repeat mark is drawn as (Kurikaeshi Moji Shori) to the mark's advance with
textLength, so a reader narrowed or widened it whenever the two glyphs'
widths differ. Its textLength now takes the width the canvas draws that
character at; the text after it is still placed anew.
SVG reorders right-to-left characters only within a text chunk, while one
text object reorders the whole line. In
<text x="100 160 220" direction="rtl">אbג</text> the left-to-right b is
drawn right before ג with no kerning between them, so ג stayed where the
line put it and the import warned.
When kerning cannot put every absolutely placed character on its x, the
text is now cut before each such character and each piece is placed
again, and the text imports as a group of point type objects named after
the element. A text one object can place stays one object. A split text
in a clip path clips by the outlines of all its objects.
An image that SVG import writes again as PNG (a TIFF, or a PNG, JPEG,
GIF or WebP whose orientation turns it) now keeps the ICC profile its
file carries, as an iCCP chunk, when the profile's color space is the
stored samples': gray for gray samples, RGB for RGB ones. Open and
Place already keep it. Profiles of another color space, ones too short
to be a profile, and the profile of a TIFF whose own reader converts
its pixels to RGBA are left out, and the image still imports. Sample
types a PNG doesn't hold are stored as 8-bit RGBA, as Open and Place
store them.
Type on a path whose frame starts with a repeat mark drawn as the
character it repeats is now written as outlines with a warning, as other
type on a path that a <textPath> cannot reproduce is. With Kurikaeshi
Moji Shori off it stays live text.
The pieces a Warp effect cuts an image into share one <image> in the
defs. The writer counted every piece, hidden ones included, so pieces
the file leaves out (hidden, or in a hidden clip group) still put an
<image> into the defs, with the linked file's path under Images: Link.
A confined caller's read-root check looks only at the art the file
draws and did not refuse it.
Image sharing and the colorized-image counts now walk only the art the
writer draws: hidden layers and objects only with hidden layers kept,
and never a template layer's art.
Paragraph panel menu > Kurikaeshi Moji Shori (text.setFormat
{kurikaeshiMojiShori}) is a paragraph attribute, off by default, saved
only when on and carried by paragraph styles. On, a repeat mark (々, ゝ,
ゞ, ヽ, ヾ) that starts a line of point or area type is drawn as the
character it repeats, with the mark's width, and the text keeps the
mark. Threaded type looks back into the frames before when a paragraph
continues. Live SVG text writes the drawn character and places the
text after it.
A feGaussianBlur or feDropShadow whose blur is not the same in every
direction in the document came in as an even Gaussian Blur or Drop
Shadow of the mean standard deviation. That covers two different
standard deviations (stdDeviation="4 1") and an even one in a skewed or
unevenly scaled user space. An SVG Filters effect in such a user space
is exported live under that transform, so on reopening its blur lost
the difference between directions.
Such a filter is now kept as an SVG Filters effect, which draws it as
it is. A blur in a turned, flipped or evenly scaled user space still
becomes the live effect, and a filter that no SVG Filters effect can
keep still comes in as the nearest even effect, as before.
The Character panel shows Adjust Horizontal and Adjust Vertical Diacritic
Position with the Middle Eastern options. text.setFormat and
text.setRangeStyle take diacriticHorizontal and diacriticVertical, in
thousandths of an em from -1000 to 1000. Positive values move the
characters' mark glyphs (GDEF class 3) right and up, and the letters keep
their places. An Arabic harakat or a Hebrew point styled apart from its
letter takes its own values without splitting the shaping cluster.
Character styles and Character Style Options carry both values. They are
saved only when set, and SVG export writes such type as outlines.
Docs: docs/mcp.md, docs/type-parity.md, docs/target-app-parity.md.
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.
A startOffset given as a length now counts in the units of the
referenced element's pathLength, so pathLength="100" on a path 400
long puts startOffset="50" at 200. A percentage stays a share of the
computed length. A pathLength of 0 keeps an offset of 0 at the start
and puts any other offset past the end, and an offset too large to
scale starts at the path's end instead of its start.
https://www.w3.org/TR/SVG2/text.html#TextLayoutAlgorithmhttps://www.w3.org/TR/SVG2/paths.html#PathLengthAttribute
set_by_not_rules tested every rule with a :not() against every element,
while matched_bytes, which charges the import's selector budget, counts
only the rules Index::candidates gives for the element. A style sheet of
many class-keyed :not() rules made the pre-pass test rules x elements
selectors that the budget never saw. It now loops over the same
candidates, which hold every rule that can match the element, so the
properties it returns are unchanged.
In a turned or skewed user space, the source is drawn onto the filter's
canvas pixels first and cut to the pixels it draws there, so the image
lies along the user space's axes. A region in objectBoundingBox units
(the default filterUnits) and primitive lengths with
primitiveUnits="objectBoundingBox" are then measured against the
object's box in that user space instead of the raster's box turned into
it.
SVG export and the image fallback keep a filter live only when SVG
import can store its user space again: scale and axes together can
scale it past 0.001 to 1000 points to a unit while each is valid alone
(scale 1000 with axes [2, 0, 0, 2]). Such an object is written as an
image. Import and export share the user-space check.
An SVG whose filtered element sits under a rotate, skew, uneven scale or
matrix transform now opens with the filter as a live Effect > SVG Filters
effect instead of losing it with a warning.
- The svg.filter effect takes an optional axes [a, b, c, d]: the document
directions of one unit along the filter's x and y axes, before scale.
effect.apply and effect.setParams refuse axes with an entry outside
-1000..1000 or a determinant within 0.001 of 0.
- With axes, the filter runs on a canvas lined up with its user space, so
offsets, blurs and the region run along the element's axes, and the
result is drawn back through axes. The canvas holds at most 4 times the
object's raster pixels. A region measured against the object's box uses
the object's box in that user space.
- SVG import stores the element's user space as scale, origin and axes.
- SVG export writes such a filter live: a group's transform holds the
user space, and the art is written in document coordinates in a group
with the inverse transform, so strokes keep their widths.
- A form other than the default, set with text.setRangeStyle or
text.setFormat, takes away the characters' glyph choice, which would
otherwise keep drawing its own glyph. "default" keeps it.
- With a width form (fwid, hwid, twid, qwid), shaping leaves out palt and
turns kern and apkn off, and SVG output writes font-kerning: none and no
palt, as the OpenType feature list asks. proportionalMetrics and kerning
keep their values.
- The Glyphs panel menu counts a width form as available when a face has
the feature in GSUB or GPOS.
- At a caret, the menu's check marks and its no-op check read all the
text of the object, which is what the command formats. Choosing the
current form again is not skipped when a character has a glyph choice.
The measurement that runs before the style cascade and usvg now covers
the inputs that still got past it:
- usvg matches a selector without keeping what it found, so one whose
leftmost part matches nothing tests every set of ancestors in turn.
The measurement counts those tests for each copy and stops at
50,000,000; past that the SVG is refused with "the SVG's style sheets
take too long to match". An SVG image's matching stops at what the
SVG showing it left.
- A test counts one more for every 16 attributes a lookup scans and
every 16 bytes of the value it compares, so many classes against a
long class list count the work they do, in usvg's matching and in
the import's own cascade.
- The declarations the import's own cascade keeps, once per element,
count toward the 64 MB, including those of `:not()` rules, which usvg
drops. Each `:not()` alternative counts as a test.
- A linked SVG file is measured before its cascade runs. The linked SVG
files share one measurement: once they pass the limits together, the
files after that are shown without their links. The tests a file past
the limits made still count.
- SVG images share the element limit and the selector tests with the
SVG showing them, as they already shared the 64 MB.
The svg_filters reader measures its SVG before the cascade too.
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.
A <use> in a clip path that shows a text kept only one clip path when
both carried one: the text's own applied, and the <use>'s was dropped
with the warning "clip path of ... in a clip path ignored: the text's
own applies", so art that the <use>'s clip path should hide showed.
The placeholder for such a text now clips by a clip path that holds
both: the text's clip path in the text's user space and the <use>'s in
the <use>'s, each on a rectangle over the text's bounds so a clip path
in bounding box units still measures the text.
With Show East Asian Options on, the Glyphs panel menu lists Traditional
Forms, Expert Forms, JIS 04, JIS 90, JIS 78 and JIS 83 Forms, Monospaced
Full-Width, Half-Width, Third-Width and Quarter-Width Forms, and Revert
To Default Forms. Each form draws the selected characters with the
font's OpenType feature for it (trad, expt, jp04, jp90, jp78, jp83,
fwid, hwid, twid or qwid). A form is checked when every selected
character has it and disabled when none of the faces that draw the
selected text, fallback faces included, has the feature.
The form is a new character attribute, glyphForm, one form at a time
(text.setFormat, text.setRangeStyle). It is saved only when set,
character styles carry it, and runs that differ only in their form
shape as one piece of text. SVG writes it in font-feature-settings;
PDF draws the glyphs from the layout.
The prepass writes a key in place of each <feImage> data URL before usvg
reads the SVG, and the filters kept as Effect > SVG Filters were read from
that edited text, so their XML held the key. The effect's check refused it
and the filter was dropped with a warning. The filter's XML now has each
keyed href put back as it was written.