In Turkish, Brazilian Portuguese, Indonesian, Bulgarian and Vietnamese
the Character panel's Leading field and the rows that name leading used
different words: Auto Leading in the Justification dialog, the Type
preferences' Size/Leading increment, and the Paragraph panel menu's
Top-to-Top and Bottom-to-Bottom Leading.
Turkish had four words, and its Leading field read "Lider", a leader.
Turkish now uses "Satır Aralığı", its Auto Leading word, in every
leading row, the Leading field included. In pt-br, id, bg and vi the
other rows now use the Leading field's word ("Entrelinhamento",
"Leading", "Междуредие", "Giãn dòng"). A new test checks that every
word of the Leading field appears in the four other rows of each
catalog.
When a recorded chord takes the shortcut from a command that needs a value, that command
leaves the list. The dialog now clears its Go to Conflict target as well as its recording
and selection.
When Clear, Use Default, Reset to Defaults or another set takes the
shortcut from a command that needs a value, its row leaves the list. A
recording started on that row now stops and the row is no longer
selected, so the next key press does not give the hidden command a
shortcut or take one from another command.
A command that needs a value stayed listed when a saved or imported set held an empty shortcut
for it, showing no key. It is now listed only while its saved shortcut is not empty.
Edit › Keyboard Shortcuts listed every engine command with a menu path,
whatever its params. A shortcut runs a command with no params, so a key
given to File › Document Setup › Units ran document.setUnits with {}
and failed with "unknown units".
The dialog and shortcuts.list now leave out a command with a menu path
and no default shortcut when no item of the menu bar runs it without
params, it opens no dialog when run without them, and its params doc
names a required field. This leaves out 38 commands, among them the
Graphic Styles, Swatches and character and paragraph style commands
that take a name. A command whose shortcut the user has changed is
still listed, where the key can be changed or cleared, and a saved key
still runs and conflicts as before. Every command with a default
shortcut stays listed.
Docs: docs/mcp.md, docs/target-app-parity.md.
The reference app disables its Lock, Hide and Show All menus in
isolation mode. In VectorCraft every item of Object › Lock and
Object › Hide, Unlock All and Show All worked there.
In isolation mode, object.lock, object.lock.above,
object.lock.otherLayers, object.hide, object.hide.above,
object.hide.otherLayers, object.unlockAll and object.showAll are now
off. Their menu items are greyed out, and a call returns an error
that ends "exit isolation mode first". The Contextual Task Bar's
Lock button is greyed out too, and the Properties panel's Quick
Actions leave out Lock. Pattern editing mode and opacity mask editing do not count as
isolation mode for these commands. The check is outside_isolation in
cmd.rs, with has_selection_outside_isolation beside it.
Docs: docs/mcp.md, docs/target-app-parity.md.
Escape did not cancel a drag with the Puppet Warp, Perspective Grid,
Perspective Selection and Liquify tools: the drag went on until the
mouse was released. Escape cancels a drag with the Direct Selection,
Gradient and Artboard tools.
Escape now cancels a Puppet Warp pin drag or turn, a Perspective Grid
handle or plane widget drag, a Perspective Selection move, resize or
plane widget drag, and a Liquify stroke. The art and the grid go back
to how they were when the drag began, the undo history does not
change, and the rest of the drag and the release send nothing. Puppet
Warp selects again the pins that were selected before the press.
During a Liquify Alt-drag that sizes the brush, Escape puts the brush
size back; the tool claims Escape only then. Escape during a
Perspective Selection press that has not moved past the drag threshold
ends the press, so moving on does not start a move. Otherwise, outside
a drag, Escape does what it did before.
Docs: docs/mcp.md, docs/target-app-parity.md.
A closed arc from Arc Segment Tool Options, an Arc tool drag or
shape.arc with lengthX and lengthY closed through the box's bottom-left
corner with Base Along X, which makes a convex arc a quarter-ellipse
sector. With Base Along Y it closed through the corner a convex arc
bulges toward, so it drew the thin sliver between the arc and that
corner instead.
Such a closed arc now closes through the corner across from the one a
convex arc bulges toward with either base, so the Y-axis arc, open or
closed, convex or concave, is the X-axis arc mirrored top to bottom.
Open arcs and arcs with Base Along X are unchanged. The two-point
shape.arc form, whose params list no baseAlong, now closes through
(x1, y2) whatever baseAlong says.
Docs: docs/target-app-parity.md.
The Tabs panel drew its X: and Y: label untranslated, so French showed
"X:" in place of its catalog's "X :" with a no-break space, and Chinese
showed an ASCII colon. The label now goes through the catalogs, and the
Polish and Vietnamese catalogs get their X: and Y: rows.
The Character Styles and Paragraph Styles panels took only clicks on
their rows. The reference app copies a style dragged onto Create New
Style and deletes a style dragged onto Delete.
A style row can now be dragged. Dropped on Create New Style, the style
is copied with charStyle.duplicate or paraStyle.duplicate, as the panel
menu's Duplicate does, and the panel highlights the copy. Dropped on
Delete, the style is deleted with charStyle.delete or paraStyle.delete,
as the Delete button deletes the highlighted style, and Delete accepts
a dragged style even when the highlighted one is Normal or none. Normal
is not deleted. Each button is outlined while a row it accepts is held
over it, and each drop is one undo step.
Docs: docs/target-app-parity.md.
The merge test covered adjacent matches and a path of another color
between two matches. It now also covers a matching path the stroke
does not touch, between two it touches: both touched paths merge into
the upper one and the untouched path is left as it was.
A Blob Brush stroke used to merge with every closed path of its fill
color and no stroke that it touched, anywhere in the document, across
layers and groups and past objects of other kinds. It now merges with
the topmost such path it touches, and with the other touched matching
paths in the same group or layer that are next to that path in
stacking order, with no other kind of object between them. Merge only
with selection still limits the candidates to selected paths. The
merged path keeps the topmost path's id and place.
The reference app places a new layer below the selected layer with
Ctrl+Alt-click (Command+Option-click) on the New Layer button, and a
new sublayer at the bottom of the layer list with the same click on
the New Sublayer button. In VectorCraft that click opened Layer
Options, and New Layer and New Sublayer always added the layer above
the current layer and the sublayer on top of the layer's contents.
layer.new takes below, which adds the layer directly below the current
layer at its level, and layer.newSublayer takes bottom, which adds the
sublayer under the parent's contents. In a clipping layer the new
sublayer goes above the clipping path. Each is one undo step, and
below is refused together with top. A Cmd/Ctrl+Alt-click on the
Layers panel's New Layer and New Sublayer buttons runs them. A plain
click, an Alt-click and a Cmd/Ctrl-click work as before.
Docs: docs/mcp.md, docs/target-app-parity.md.
A .ai swatch library without layers comes in as its PDF part with the
swatches of its editing data's palette. A pattern swatch was kept only
when the PDF part defined its pattern, and a pattern library's PDF part
usually defines none, so its pattern swatches were dropped.
ai::palette now gives pattern swatches for the patterns the editing
data defines too, and returns the definitions the PDF part lacks that a
palette swatch paints with, with the images their art shows. The
document gets them with new object ids.
A .ai file whose editing data has no layers, as swatch libraries are
saved, opens from its PDF part, and the PDF part has the default
swatches. layered_ai applied the editing data's palette only when it
built the document from the layers, so Other Library… listed the
default swatches for such a library, and File › Open gave the file the
default swatches as well. A .ai whose layers can't be used (an image
too large for the editing data's reader, or a read error) lost its
palette the same way, and so did an EPS that opens as its page.
The reader now reads the palette on its own (ai::palette, which shares
palette_swatches with the layer reader), and its swatches and color
groups replace the default swatches in those three cases. Spot and
pattern swatches of the PDF part's art that the palette does not have
follow the palette's swatches.
Fixes#4100. Part of #3349.
The Type tool heard of Undo and Redo only when they ran as top-level
commands. As steps of command.batch, they left the caret where it was,
and the tool took the batch for an outside edit. Session::execute now
tells the active tool about each nested edit.undo and edit.redo.
command.batch also tells the tool when it begins, ends or rolls back.
The Type tool keeps its caret and its edit records at the start of each
batch and puts them back when a failed batch rolls the documents back.
While the Type tool edits type, Edit > Undo and Redo (the menu, the
keyboard, the History panel and MCP all run edit.undo and edit.redo)
left the caret at its byte offset, clamped to the text. Typing "abc"
before "XYZ" and pressing Undo left the caret after "XYZ".
The engine now tells the active tool about edit.undo and edit.redo
before it finishes the command. The Type tool keeps the edited text and
a list of the steps that changed it, and puts the caret, with nothing
selected, at the end of the span the step changed: where typed text
began after its Undo, after restored text after the Undo of a deletion,
and after retyped text after Redo. For the steps the tool made, it keeps
where the span ended, so text that repeats the characters next to it
puts the caret at the right end. A step that changes no characters,
such as a formatting change, leaves the caret and the selection as they
are. Typed lists keep their caret positions.
In Brazilian Portuguese the Character panel's Kerning field was named
Entrelinhamento, the word the catalog uses for Leading, so the two
fields had the same name. In Danish, Turkish, Indonesian and Dutch the
Reset Tracking and Kerning command named tracking with a different word
from the Tracking field, and in Dutch, Bulgarian and Greek the Info
panel's type line did the same.
The pt-br Kerning field is now Kerning (0 = Automático). The reset row
in da, tr, id and nl and the Info panel row in nl, bg and el now use
the word of the catalog's Tracking field. A new test checks that the
three fields have different names in every catalog and that the reset
row and the Info panel row use the field words.
An axial or radial shading's stops are the samples that linear
interpolation does not reproduce. An ink that changes nothing in RGB,
such as a varnish, could paint at dropped samples only, and its spot
swatch was then missing. Every sample now marks the inks it paints with
as used; the stops are unchanged.
A DeviceN color with a spot ink at a tint above 0 together with a process
plate or a second ink imports as RGB. The importer returned before marking
those inks as used, and only used inks become spot swatches, so the spot
ink was missing from the document and from every later export. Shading
stops take the same path, so a DeviceN gradient lost its ink the same way.
The art still imports as RGB with the existing warning; each ink it paints
with now becomes a spot swatch with its 100% color.
GIF, WebP and Targa files hold no resolution field, so document.formats and
the export docs now say that ppi, and the resolution that width or height
gives, are stored in the file except in those three formats.
PNG, PNG-8, JPEG, WebP, GIF, TIFF, BMP, Targa and PSD exports take
`width` or `height` in pixels. Each file is scaled so that its own
artboard, `rect` or art bounds is that wide or high, so with
`useArtboards` every file gets its own scale. `width` wins over
`height`, and either wins over `ppi` and `scale`, in the order an
Export for Screens row reads its size. The scale stays within 0.01 to
64 pixels per point and the file stores the resolution that results.
A value that is not a positive number is refused.
The per-file scale comes from `ScreenSize::scale_for`, which Export for
Screens rows already use. Rows keep their own size: their format
settings still drop `width` and `height`. `document.formats` lists the
two options for every raster format.
The check after the last file returned the cancelled error for every
export. A folder export without a ZIP has written each file by then, so
a cancel that came during a final step that writes nothing (a row whose
file repeats the one before it) reported a finished export as
cancelled. The check now runs only for exports that still hold their
files: those without a folder and those that make a ZIP.
A cancel that came after the last file's check was not seen: an export
without a folder returned its files or its archive anyway. The export now
checks once more after the last file and again after deflating the
archive, so a cancel returns the cancelled error and nothing is written
or returned.
zip::deflate takes a `stop` callback that it calls before each 1 MiB of
a file. Export for Screens passes the cancel state, so deflating stops
at the next MiB. file.package passes one that never stops, so its
behavior does not change.
With `zip: true`, document.exportForScreens deflated nothing: every file
went into the archive stored. Each file is now deflated, or stored when
deflating does not make it smaller, as file.package's archive does. The
file list, the names and the reply's fields stay the same; `bytes` and
the archive's contents change. Entries keep the fixed 1980-01-01 date, so
the same files still give the same archive.
The deflating writer moves from package.rs into fileio/zip.rs as
`zip::deflate`, beside `zip::store`, and file.package calls it there with
its own date and error text. The test reader `zip::entries` reads
deflated entries too. The `zip` option's text in docs/mcp.md,
docs/control-protocol.md and the command's params says the files are
deflated.
An Alt-click right of a short layer name, inside the wider rename
target, no longer replaces the selection. The isolated layer's own row
now selects the art inside it (layer.selectAll), where it cleared the
selection before. The doc line says the click selects visible, unlocked
art and clears the selection on a hidden or locked layer.
The reference app selects all objects on a layer with an Alt-click
(Option-click) on the layer's name in the Layers panel. In VectorCraft
an Alt-click on a name did what a plain click does: it highlighted the
row and made the layer current, and the art stayed unselected.
An Alt-click on the name of a layer or sublayer now also selects its
visible, unlocked art, as the row's selection square does
(layer.selectAll), and the layer still becomes current
(layer.setCurrent). On a locked or hidden layer the click clears the
selection, as that row's selection square does. On a group or object
row, beside the name, and with Shift or Ctrl/Cmd held as well, the
click does what it did before.
Docs: docs/mcp.md, docs/target-app-parity.md.
The reset ran paint.editGradient, which changes every run of a type
object and leaves a stroke without paint at weight 0. It now runs
paint.setFill or paint.setStroke with the linear White, Black gradient:
characters selected with the Type tool take it and the rest keep their
paint, and a stroke without paint gets the 1 pt weight, as a plain click
on the Gradient button already does.
The reference app resets a gradient to black and white when the
gradient button in the Tools panel is Cmd/Ctrl-clicked, and to the
default black and white linear gradient when the Gradient Fill box in
the Gradient panel is Cmd/Ctrl-clicked. In VectorCraft a Cmd/Ctrl-click
on either did what a plain click does, and the reset was only in the
Gradient panel menu.
A Cmd/Ctrl-click on the Gradient panel's thumbnail or on the Tools
panel's Gradient button now makes the gradient of the active Fill or
Stroke a linear gradient with the White, Black stops, through
paint.editGradient, as one undo step. A solid or no paint becomes that
gradient, and with nothing selected the default paint changes. A plain
click keeps its behavior, and the panel menu's Reset to White, Black
is unchanged.
Docs: docs/target-app-parity.md.
The reference app selects the complement of the current fill or stroke
on a Cmd/Ctrl-click of the Color panel's color bar and the inverse on a
Cmd/Ctrl+Shift-click, and with Alt (Option) also held it changes the
nonactive one. In VectorCraft these clicks picked the spectrum's color,
and a Cmd/Ctrl+Shift-click cycled the color modes.
A Cmd/Ctrl-click on the spectrum now applies Complement and a
Cmd/Ctrl+Shift-click applies Invert to the active Fill or Stroke, as
the panel menu's items do: a selected gradient stop or freeform point
is recolored in place, and a solid color goes through paint.complement
or paint.invert. With Alt also held, the click runs the command on the
inactive proxy, which stays behind. A Cmd/Ctrl drag still picks colors,
and plain, Alt and Shift clicks keep their behavior. The panel menu's
Invert and Complement use the same code.
Docs: docs/target-app-parity.md.
The released buttons go after the frame's last pointer movement, at its
position. Before, they went first, at the press position, so a press that
moved past the click distance in the same frame ended as a click on the
widget under the press.
egui ends a drag only on a button release or Escape. When the window
never receives the mouse-up, a drag such as a dock column's resize keeps
following the pointer with no button held.
On macOS, each frame's input now gets a release for every button egui
still holds when NSEvent.pressedMouseButtons reports no button down, at
the pointer's last position. Frames that carry a button event, and
control-channel input that holds a button between steps, are left as
they are.
A click with the Scissors tool cut the path whether or not Alt was
held, and the cursor stayed the Scissors cursor. The reference app's
shortcut list has "Switch Scissors tool to Add Anchor Point tool" on
Alt (Option).
While Alt is held, a click with the Scissors tool now does what a click
with the Add Anchor Point tool does: on a segment it adds an anchor
point with path.insertAnchor in one undo step, and the path is not cut.
The cursor is the Add Anchor Point tool's while Alt is held. When Alt
is let go, the cursor is the Scissors again and a click cuts.
Docs: docs/target-app-parity.md, crates/tools/src/cursors.toml.
The reference app's shortcut list switches between its Type tools with
Shift and with Alt (Option). VectorCraft's Type tools had no such switch.
While no type is being edited, a press with Shift held makes new type
with the chosen tool's horizontal or vertical counterpart: Type and
Vertical Type, Area Type and Vertical Area Type, Type on a Path and
Vertical Type on a Path. A press with Alt held makes it with Type on a
Path in place of Area Type, or the reverse, in the same writing
direction. With both keys held, both switch. The keys held when the
press starts are the ones that count. The pointer shows the tool the
press acts as, and the chosen tool stays selected. While type is being
edited, Shift and Alt work as they did.
Docs: docs/target-app-parity.md.
The reference app switches the units of measurement with
Ctrl+Alt+Shift+U on Windows and Option+Shift+Command+U on macOS.
VectorCraft could set the document's units with document.setUnits or
a right-click on a ruler, but no command stepped through them and no
key did it.
document.switchUnits (Switch Units, default Cmd+Alt+Shift+U) sets the
document's units to the next one in the order a right-click on a
ruler lists them: Points, Picas, Inches, Millimeters, Centimeters,
Pixels, Feet & Inches, Meters, Yards, Feet, and from Feet back to
Points. Each press is one undo step, and the reply names the new
units. Keyboard Shortcuts lists it under Document.
The precise cursors shortcut-editor test used Cmd+Alt+Shift+U as a
free key; it now uses Cmd+Alt+Shift+Q.
Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md.
With the Width tool, Escape did not deselect the selected width points:
they stayed selected, Delete still removed them, and in isolation mode
the same Escape left isolation mode. The reference app's shortcut list
gives Esc for deselecting a width point.
Escape now deselects the Width tool's selected width points. The path,
its widths and the undo history do not change, and no command is sent.
While width points are selected the tool takes Escape, so that Escape
does not also leave isolation mode. With no width point selected, and
during a drag, Escape does what it did before.
Docs: docs/mcp.md, docs/target-app-parity.md.