A pattern's definition (in either form) and a brush's art were read
without the file's art styles, so an object there with a style came in
as the look it draws, with a "drawn look" note, while the same object on
a layer or in a symbol came in as itself with its effects live. The
three definition readers now take the art styles as the symbol reader
does, and an object in a pattern's art with a style in the file's style
list keeps that graphic style's id.
An art styles section inside a symbol's, a pattern's or a brush's art
is now skipped, so it no longer replaces the file's own art styles.
The editing-data writer wrote a run's key 35 only for Tate-chu-yoko (3).
Type with Standard Vertical Roman Alignment, on or off, was saved with no
key, so the setting was lost from the editing data. Every run now carries
key 35 in the form the reader reads it (crates/eps/src/import/ate.rs,
Texts::style, lines 669-670): 1 when the setting is on, 2 when it is off
and 3 for Tate-chu-yoko. The document's defaults and the normal character
style carry 1.
Key 35 holds one value, so a run with both Tate-chu-yoko and the setting
is written as Tate-chu-yoko, and the save reports the type attributes
warning for it.
- writer/texts.rs: baseline_direction() gives each run's value;
normal_char() writes 1; loses() and TYPE_ATTRIBUTES name the setting.
- tests.rs: a vertical and a horizontal object with the setting on, off
and Tate-chu-yoko come back the same through the reader, lay out as
before, and carry the expected keys; a run with both is reported.
- docs/file-format-parity.md: the .ai save section lists the written
values.
swatch.new stored a gradient or pattern as it was given. A gradient
swatch made from a gradient swatch by name, from a fill linked to one,
or from a gradient that names one (the Gradient panel's add to
swatches) kept the link to that swatch, so copying art that uses the
new swatch brought the other swatch along too. A pattern swatch made
from a current fill picked up from art with transformed tiles kept
that transform, and art the swatch was applied to took it in place of
its own.
The new swatch now drops the gradient's link and stores the pattern
untransformed. A gradient swatch keeps its aspect as before.
The editing-data reader set the paint of each gradient swatch in the
palette to link to the swatch's own name. The default gradient swatches
and a gradient swatch given a new gradient with swatch.edit hold their
gradient without a link, so a document saved as .ai and opened again
had swatches that differed from the ones it was saved with. The swatch
now holds the gradient alone. Art filled with the gradient is not
changed: it still links to a swatch by the gradient's name.
The fix also applies to a .ai whose layers are not read, such as a
gradient library, where only the palette comes in.
Three tests cover a hand-written palette with a gradient swatch named
by its gradient and one with a name of its own, a new document's four
gradient swatches written by the editing-data writer and read back, and
a gradient library without layers.
dialogs::tests::workspace_and_toolbar_dialogs_end_at_their_buttons now
requires the gap between OK and the bottom of the window to be 0 to 40 pt,
so an OK drawn past the window's bottom edge fails. It requires exactly one
OK inside the window, and in New Workspace and New Toolbar exactly one
Cancel on OK's row to its left; the two Manage dialogs have no Cancel. It
also requires the gap between OK and the nearest shape drawn above it to be
under 40 pt.
The modern type reader read key 35 of a character style only for
Tate-chu-yoko (3). A run whose key 35 is 1 (Standard), in the run, its
character style or the document's defaults, now opens with Standard
Vertical Roman Alignment on, so its half-width characters stand upright
in vertical type. Horizontal type keeps the mark with no change to its
layout. A value of 2 (rotated), 3, any other value and no key at all
leave it off, VectorCraft's default.
- ate.rs: Style reads the flag and passes it to CharStyle, with a unit
test over defaults, character styles, run overrides and bad values.
- tests_native.rs: a vertical and a horizontal story with Standard,
rotated and unset runs; the test of values the reader ignores also
checks the flag.
- import_fuzz.rs: the vertical fixture also checks the flag.
- docs/file-format-parity.md: one line on the mapping.
Three copies of the Symbols Reset Transformation entry were in
docs/target-app-parity.md. The complete one, which lists all five
tests, stays; the two older copies are removed.
Escape and Cmd+Enter (Ctrl+Enter on Windows and Linux) end text editing
and switch back to the tool that double-clicked into the type, or to the
Selection tool when there was none (`TypeTool::end_editing`). The
evidence lines in docs/type-parity.md, docs/ui-parity.md and
docs/target-app-parity.md, and the doc comments on `prev_tool` and
`claims_key`, said they always switch to the Selection tool.
The legacy .ai writer gives the type attributes warning when a text
object loses something it cannot hold. It did not give it for several
attributes that it does not write:
- Align to Path set to Ascender, Descender or Center.
- An end bracket before the end of an open path, or short of once
around a closed path. A legacy text path holds the path and the start
point only (AI7 File Format Specification, section 15).
- Manual kerning other than 0, which is written as kerning off, and
optical kerning.
- Optical Margin Alignment, System Layout and fractional widths off.
- A second subpath in an area type frame or a type path. The writer
writes the first subpath only.
The warning now names each of these.