On a tabbed line measured as drawn, a full stop or comma now hangs when
it is last in the visual order of the line's levels (UAX #9 L2, with
each tab and the spaces before it at the paragraph's level), whatever
its own level. A mark at level 2, or a lone right-to-left mark after
left-to-right text, hangs again; a mark inside a right-to-left run
still ends the line at an earlier break.
A mark that No Break or Bunri-Kinshi keeps with the characters after
it no longer ends the line as if it hung: the line would end with
those characters, which are drawn inside it, so it ends at an earlier
break.
A right-to-left paragraph draws a comma or full stop inside its line,
but the breaker still kept an overflowing mark on the line as if it
hung, so the line was drawn past the frame. The breaker now ends such a
line at a break where it fits with the mark.
In a left-to-right line with right-to-left text and a tab, the breaker
hung an overflowing mark without measuring the line as drawn. It now
hangs the mark only when the mark is drawn at the line's right end and
the line before it fits as drawn; otherwise the line ends at the latest
legal break that fits as drawn.
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 block's line took the tallest ascent and deepest descent of its
characters, or the height of the stack's em boxes, whichever was larger.
The top block line's characters reach above the stack by their ascent
past the em box, and the bottom line's below it by their descent, so with
a wide Line Gap the line was too short for them. The line's ascent and
descent now also take in each character's reach from its own block line's
baseline.
Tsume narrows a cluster before Optical kerning measures its pairs, so
Optical measured the narrowed gap and gave part of the space back.
Optical now measures each pair as it would be without the Tsume, as it
already does for Insert Aki, and the Tsume stays on top. Tsume records
what it took on the glyph for this.
When the last of the bounded breaks such a line reads came right before
U+2028, the line ended at that break and the next line held only the
forced break, drawing an empty line. The line now reads on to the
forced break and ends there when it fits as drawn.
tab_advance read the text after a tab up to the next tab for every
stop, though only right, center and decimal stops align it. The first
tab of a long paragraph read the paragraph to its end, even on a line
that stops reading a bounded number of breaks past its overflow. It
now reads that text only when it reaches a stop that aligns it.
Where a tabbed line with glyphs stepping back stops reading at its break limit on a soft
hyphen that ends the text, it now ends there without a hyphen, as a line that reads to the
end of the text does.
With Invert Wrap and a positive offset, a line's band was cut into at
most 64 pieces, and anchor cuts were dropped when a shape had more than
64 of them. Beside a notch the offset fills, a line could stop at the
notch instead of at the grown edge: 20 pt short beside a 0.5625 pt notch
with an offset of 1, and short beside sloped notch sides and tall bands.
The grown shape is now measured exactly: the shape near the band is cut
into trapezoids, each grown by the offset into a convex polygon, and the
line keeps the x at which those polygons hold every height of its band.
The work is capped; a shape that needs more steps than the cap, for
example one whose edges cross one another tens of thousands of times,
keeps the 64-piece measure, which keeps the line inside the grown shape.
A band of no height exactly the offset past a shape's tip now holds a
line too.
Once a right-to-left line holds a tab and a glyph with a negative
advance, the least it can be drawn at no longer grows with its tab
stops, so a line that overflowed in the order of its text read on to
the end of the paragraph before settling its break. Setting every line
of a long paragraph that way took time quadratic in its length.
Such a line now reads at most 256 legal breaks past where it first
overflows in the order of its text, and ends at the latest break read
that fits as drawn, the same limit the breaker uses for breaks it
measures one by one. Lines without negative advances, and lines that
fit, keep their breaks.
Unshaped complex scripts: no joiner boxes, no kashidas or path bending as if joined, a toggle that
keeps shared Standard shaping, a test font fix, and doc wording for the scripts left unshaped.
Four paragraph composers: the existing Single-line and Every-line (Middle Eastern & South Asian,
complex scripts shaped, the default) and Standard Single-line and Every-line, which break lines the
same way and set Indic, Arabic and Hebrew type glyph by glyph as the font maps it.
Paragraph panel menu, Paragraph Style Options, text.setFormat, native file and paragraph styles.
.ai, EPS and PDF files carry no composer.
A paragraph whose characters differ in line metrics, in area type that is
not a rectangle or that wraps around an object, was broken line by line
with the Single-line Composer when the frame could not hold all of it.
The lines the frame holds are now composed with the whole paragraph: a
line the frame has no room for, and every line after it, is measured as
wide as the span of the last line set in the frame, less its indents.
Those lines overflow, or go on in the next threaded frame, which composes
them again at its own widths. A paragraph whose first line has no room,
and a search that passes its limits, still fall back to Single-line.
Docs: docs/mcp.md, docs/target-app-parity.md.
Two intervals at the middle of a band joined whenever their crossings
came out at the same x, even when the two edges are not along one line
and only round to that x. A slanted edge whose crossings of the band all
round to the x of a separate contour's edge then let a line run across
the gap between the contours.
The crossings now carry the line they were found along. Intervals join
at an x only when both crossings are along one line (contours that meet
along an edge) or both lie exactly at that x.
An edge that two contours of an area type frame share lies inside the
frame, and lines already run across it. Inset Spacing still kept text
clear of it, so a frame of contours that meet along an edge left a gap
of twice the inset at the seam. The inset now applies only beside the
stretches of edges that bound the frame, counted by parity as the line
spans are. A negative text wrap offset no longer shrinks a wrap object
beside an edge two of its contours share.
When a wrap object splits a line band, the lines in the spans after the
first shared the first line's baseline even when they held taller type.
Their ascent then ran into the line above the band. A further span now
goes only to a line whose own leading sets it no higher than the span's
baseline; a taller line leaves the span empty and goes on in the next
span or on the next baseline. Both composers follow the same rule.
In area type of a shape other than a rectangle, or with text wrap, the
Single-line Composer placed each line at the metrics of its first
character and broke it in the room there. When a later character on the
line was taller, the baseline moved down by the difference without
measuring the room again, so the line could reach into a narrower part
of the frame or into a wrap object.
- A line that turns out taller than it was placed is placed again at
metrics that hold both and broken again in the room there.
- When that leaves the taller character for the next line, the line is
set at its own metrics where the room there is no narrower, and takes
the words before that character that fit there. Otherwise it stays
where it was placed.
Tests: crates/text/src/tests/combos.rs (a stepped frame and text wrap;
the two mixed-size tests now expect the Single-line Composer to break
as the Every-line Composer does there).
Docs: docs/mcp.md, docs/target-app-parity.md.
A justified line opened no gap before a right-to-left warichu block: the
glyph drawn first after the text before it is not the block's first
glyph, and it was taken as continuing the block. The block now starts at
the first of its glyphs the line draws, and blocks the bidi order
interleaves keep their starts.
The caret next to a character of a block spanned the whole line. It now
spans the band of the character's block line, as the selection does.
A glyph with a negative advance can draw a later break narrower than an
earlier one, so bisecting the breaks past the 256 measured one by one
could end a tabbed right-to-left line at an earlier break than the
latest that fits. Such a line now measures up to 1,024 breaks, or
hyphenation points, one by one before bisecting the rest.
A right-to-left line draws its last character before its tabs. When that
character loses its Japanese-Latin space at the line's end, the layout drew
it narrower before placing the tabs, but measured the line with the full
advance and took the trim off afterwards. The measured line was narrower
than the drawn one by the trim: a right-aligned line ended past the
frame's right edge (305 pt in a 300 pt frame), and a line that did not fit
as drawn was kept whole.
drawn_width now takes the end trim off the glyph it belongs to, so the tabs
drawn after it take their stops from where it ends, both where lines break
and where a line is measured for alignment.
Changing Preferences › Hyphenation › Exceptions bumped each open
document's revision, but the caches of laid-out type outside the text
crate were keyed on the font generation alone. The renderer kept the
glyph geometry, raster-effect pixels, live-effect and envelope art,
pattern tiles and placed symbol art of unchanged type objects, so
hyphenated area type kept its old line breaks on the canvas. The
hit-test art of blends and envelopes, the Fit to Artwork Bounds answer,
the layout caches of the Type and Touch Type tools and the out port's
overflow mark were keyed the same way.
vectorcraft_text::layout_inputs() returns a number that changes with
the fonts and with the hyphenation exceptions. Every one of those
caches now keys on it instead of FontDb::generation(), and envelope ink
uses it in place of the private envelope_ink_inputs(). The hit-test key
hashes it together with the plug-in revision.
Tests: a renderer that drew hyphenated area type, alone, with a drop
shadow, in a group with a Transform effect, in a symbol instance and in
an envelope, draws it as a new renderer does after the exceptions
change; the out port of selected area type shows the overflow that the
new exceptions cause. The render test helpers that run a step again
when the fonts change during it now also run it again when the
exceptions change.