Commit Graph
5528 Commits
Author SHA1 Message Date
bflatastic ca7605fe20 Canvas: record the opening fit without a branch in the canvas frame 2026-11-09 02:03:09 +07:00
bflatastic 2d945f92a1 Canvas: the opening fit's conditions in a helper, keeping the canvas frame under the complexity limit 2026-11-09 02:03:09 +07:00
Louise Fox 1b85e7fee2 Canvas: a document opens at the zoom of the settled window
A document without a saved view was fitted once, to the canvas of the first frame that shows it, and the window's layout can still move the canvas's edges over the next frames. Two starts of the app then opened one file at zooms a hair apart (4.9812 and 4.9883 in a CI probe of v0.21.0, the canvas and the view's centre alike).

The opening fit now follows the canvas until the view is moved or the user presses a button or a key, types, scrolls or zooms (CanvasCache::opening_fit). After that a canvas that changes keeps the view, as before.
2026-11-09 02:03:08 +07:00
Louise Fox f794f4665c Canvas: a test of the opening fit when the first frame's canvas is narrower than the settled one
A document without a saved view is fitted to the canvas of the first frame that shows it. The test lays that frame's canvas out 2 points narrower than the next, and expects the zoom the settled canvas gives. It fails until the opening fit follows the canvas.
2026-11-09 02:03:08 +07:00
SBaksa d329dd05e1 Export for Screens: a leading dot in an artboard name is a dash
A name like .draft would otherwise write a hidden file on Unix-like systems.
2026-11-09 02:03:08 +07:00
SBaksa 0b3ea7c1d2 Export for Screens: an artboard name keeps its dots (#6143)
The artboard and asset file stems came from unique_file_names, which turned
every character except letters, digits, - and _ into a dash, so the dot of
example.artboard became a dash. Export for Screens now uses a variant that keeps
dots (a name of only dots takes the Artboard-N fallback); safe_file_name still
drops trailing periods and guards device names.
Test: an_artboard_name_keeps_its_dots.
2026-11-09 02:03:08 +07:00
Francisco Herrera a3ed60650e Layers: row keys follow the click and release after the last row (#5870) 2026-11-09 02:03:08 +07:00
Francisco Herrera 5b98ed3b7d Layers: Delete clears the selection after the last row is deleted (#5870) 2026-11-09 02:03:07 +07:00
Alex d8d3f43642 Text styles: double-click opens Character Style Options in a scrolling window
Two problems in the Character Styles panel and its options dialog.

Opening the options took the panel menu's item, which is easy to miss; a double-click on a style's
row did nothing beyond applying the style a second time. A double-click on a user character style's
row now opens its Character Style Options (`ui.charStyleOptions`), as the menu item does. A single
click still applies the style, the second click of the double-click does not apply it again (the
Normal style's included), and with Shift, Cmd/Ctrl or Alt held the double-click only follows the
click rules. The built-in Normal style opens no dialog. Double-clicking a paragraph style's row similarly opens
its options, which are the rename dialog the Paragraph Styles panel menu opens (`ui.paramDialog`
running `paraStyle.rename`): paragraph styles have no full options window yet.

The dialog then grew with its content: the General section lists every attribute of the style, so
the window covered the screen and its buttons could sit below it. The content now scrolls both ways
inside a window at most 420 points tall (less on a short screen) and never wider than the points
left beside the section list, with one scroll offset per section. The dialog keeps a fixed width of
720 points, enough for the widest section's controls, in every section. The content's height is the
space the footer leaves, measured from the footer drawn last frame, so a large interface scale's
taller footer is reserved too and OK and Cancel stay visible. The section list stays outside the
scroll area, so scrolling a long section never moves the navigation; the section is read after the
list handles a click, so a newly picked section gets its own scroll offset in the same frame.

Tests:
`panels::text_styles::tests::double_clicking_a_character_style_row_opens_its_options` selects text,
double-clicks a character style's row and checks the dialog opens with the style's name, one apply
ran from the first click and the second click applied nothing; a paragraph style's row opens none.
`double_clicking_the_normal_style_opens_no_options` checks the Normal style opens none and is
applied once.
`dialogs::char_style_options::tests::the_sections_scroll_in_a_window_shorter_than_the_general_list`
draws the dialog on a 900 by 560 point screen and checks OK and Cancel stay on it, the dialog keeps
its 720-point width in two sections, and the General list is taller than its scroll area.
`every_section_and_the_buttons_fit_the_smallest_window` checks the app's minimum 800 by 500 point
window in all five sections: every section label, OK and Cancel are on the screen.
`a_scrolled_section_keeps_its_offset_after_switching_away_and_back` scrolls General, clicks Basic
Character Formats and then General again, and checks General''s content returns to the same place:
the section is read after the list handles the click, so no other section stores its offset.
`every_section_and_the_buttons_fit_the_smallest_window_at_twice_the_scale` checks the same in the
400 by 250 points the minimum window holds at 2x UI scale, before and after a wheel scrolls the
content.
Docs: type-parity (a panel row and the revision history), ui-parity (a panel row and the revision
history), target-app-parity (two evidence bullets and the revision history) and roadmap (the
revision history), with the status lines updated.
2026-11-09 02:03:07 +07:00
bflatastic 8199f30c74 Export for Screens: the asset-name test sets main's 3D format field 2026-11-09 02:03:07 +07:00
NetterSilverandClaude Haiku 5.5 c085185296 Ignore non-digit suffixes in next_asset_name
Found while testing crates/doc/src/assets.rs:43 (Document::next_asset_name)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 02:03:06 +07:00
Ahmed Gomaa 23c5f6ff7c Preferences: colour wells and sliders take their row's label
`label_inputs_by` skips controls that already have a name, so colour wells stayed "Color" and sliders kept their internal text. Name them from the visible row label, on both halves of a slider across focus changes, and keep action button names.
2026-11-09 02:03:06 +07:00
Ahmed Gomaa a89dcc1a5d Preferences: inputs expose their labels to accessibility tools
The Preferences labeled() helper painted the visible label and then drew
the input beside it without associating them. Call label_inputs_by so
screen readers and the test harness can find each field by its label.
2026-11-09 02:03:06 +07:00
Ahmed Gomaa 93a039d524 UI tests: gradient and rotation controls are found in release builds
Gradient and rotate-view harnesses looked up widgets by egui Id debug
source strings (for example ".with(…)" and "rot-combo"). Those names
exist only with debug assertions, so the same tests panic in --release.
Resolve widgets from stable scope salts / AccessKit labels instead, which
work in both profiles.
2026-11-09 02:03:06 +07:00
Sven Lafebre afe8294c7d Test: anchors picked with a Cmd-lent Direct Selection over other tools are what Copy takes (#6123)
With the Rectangle and Ellipse tools, Cmd lends the selection tool chosen
last, and Copy already took the anchors Direct Selection picked. The
Curvature tool, which Cmd lends Direct Selection, copied the whole path
before this PR, as the Pen did.
2026-11-09 02:03:05 +07:00
Sven Lafebre 748ac5cf6e Pen: keep a lent pick across tool resets; a gesture that picks nothing keeps the Pen's anchor (#6123)
The remembered selection is now tied to the document it was made in, by its
uid, instead of being cleared on every tool reset: another view of the same
document, or closing an inactive tab, kept the anchors picked but made Copy
take the whole path.

A lent gesture that leaves the selection as it found it (a Cmd+Shift marquee
over nothing) is no longer recorded as a pick, so the Pen's last anchor stays
its own and Copy takes the whole path.

Also records #6123 in target-app-parity.md.
2026-11-09 02:03:05 +07:00
Sven Lafebre 91a0ba4231 Pen: Copy and Cut take the anchors a Cmd-lent Direct Selection picked (#6123)
With the Pen or Curvature tool, Copy and Cut ignore the anchor selection,
so that the last anchor the Pen leaves selected doesn't make Copy take just
that anchor (#2122). Anchors picked with the Direct Selection that Cmd/Ctrl
lends those tools were ignored too, and the whole path was copied.

The session now remembers the selection the lent tool leaves when it gives
the tool back. While that is still the selection, Copy and Cut take the
picked anchors and segments, as with Direct Selection chosen.
2026-11-09 02:03:05 +07:00
NetterSilverandClaude Haiku 5.5 194364304b Strip CSS comments from style attributes and rule declarations
Found while testing crates/svg/src/import/css.rs:20 (parse_decls / split_decls)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 02:03:05 +07:00
Sven Lafebre c2c92b7d49 Fix #5188: selected anchors that are no corner keep Shift-click adding 2026-11-09 02:03:04 +07:00
Sven Lafebre a571e242af Fix #5188: a Shift-click on a corner widget of a whole path picks its corner
With Direct Selection, a Shift-click on a corner widget toggled its
corner. With the path selected whole every corner already is, so the
first Shift-click deselected the corner clicked and hid its widget,
leaving the others. While every corner is selected, a Shift-click now
picks that corner alone, as the first click of "click one widget, then
Shift-click the others" does; with some corners picked it still toggles.
2026-11-09 02:03:04 +07:00
NetterSilverandClaude Haiku 5.5 b73a880b3c Cut PSD Unicode layer names on a character boundary
Found while testing crates/render/src/encode/psd.rs:225

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 02:03:03 +07:00
Sven Lafebre b2acf71764 Fix #5960: find how far gradient ribs reach in one pass along the path
Each rib of a dashed stroke with a width profile looked up to 256 points
either way along the path, asking the profile at every step, and reached
as wide as the stroke gets anywhere past that. A sliding maximum over the
points' precomputed cover now gives every rib's reach in time in
proportion to the points, with no bound and no fallback to the widest
width (review on #6093).
2026-11-09 02:03:03 +07:00
Sven Lafebre 8f975aa0c5 Fix #5960: a narrow part of a variable-width stroke paints over a wide part only where they overlap
With a width profile, every slice of a stroke gradient (along or across)
reached as far as the stroke is wide anywhere. Where the stroke crosses
or runs close by itself, the later, narrower part painted a square of
its colour over the wider part beside it, clipped only to the whole
outline. Each rib now reaches as far as the stroke is wide there and on
its way to the next points (each side of a profile stays between its
widths at a span's points); for a dashed stroke, as wide as it gets
within a cap's reach, since caps and dots reach along the path.
2026-11-09 02:03:02 +07:00
Davit MatchakhelidzeandClaude Sonnet 5.5 82596bacc7 i18n(ka): Georgian for 1 new string
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 02:03:02 +07:00
M Balazs PC 7f7c4cf9ad .ai import: test every paint mask art takes, and that it stays in the mask
The mask test now checks the whole fill and stroke (colour, overprint,
width, cap, join, miter, dash) and the fill rule against the owner's,
and that an object after the mask's dictionary paints with the owner's
paint, not the paint the mask's art set. open_mask_object gets a doc
comment.
2026-11-09 02:03:02 +07:00
M Balazs PC 500ff6ed4c .ai import: opacity mask art without its own paint takes the paint before its dictionary
A dictionary's state starts afresh, with a black fill. Mask art is written
going on from the paint before the mask's dictionary, which the writer leaves
out when it doesn't change, so a mask rectangle with no colour of its own
came in black and hid the white letters it masks. Mask art now starts from
the paint (fill, stroke, line style, fill rule, overprint) before the
dictionaries it is in; lock, visibility and transparency still start afresh.
2026-11-09 02:03:02 +07:00
Don Omondi d4f6fa0744 EPS/.ai editing data: art-style strokes aligned inside or outside keep their alignment
Squashed from #6010 onto main.
2026-11-09 02:03:01 +07:00
ruchirguitar b1f52d1369 Select Text by Font: limit it to artboards or layers (#5529)
Squashed from #5578 onto main.
2026-11-09 02:03:01 +07:00
Dylan M. Taylor 2ead0afaa0 affinity import: share one work and name budget across repeated links of shared objects 2026-11-09 02:03:00 +07:00
VladimirCeric e3817d6b50 Typographer's Quotes: a lone typed ” opens like a straight quote
Squashed from #5459 onto main.
2026-11-09 02:03:00 +07:00
NetterSilverandClaude Opus 5.5 05a242ff77 Scale the EPS operation budget with the program's length
Fixes #5363

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 02:03:00 +07:00
dotCooCoo fb848d28ac .ai import: objects in pattern and brush art take the file's art styles
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.
2026-11-09 00:36:09 +07:00
dotCooCoo 7b06cc070b .ai save: the editing copy keeps Standard Vertical Roman Alignment
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.
2026-11-09 00:35:51 +07:00
dotCooCoo 50bf521d45 Swatches: a new swatch holds no link or placement from the paint it is made from
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.
2026-11-09 00:35:30 +07:00
dotCooCoo cae5b356c7 .ai import: a palette gradient swatch's paint is not linked to itself
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.
2026-11-09 00:35:12 +07:00
dotCooCoo cb3e8262bc Tests: workspace and toolbar dialog test checks the gap above OK and Cancel's place
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.
2026-11-09 00:35:07 +07:00
dotCooCoo a37ad90e6c .ai import: type keeps Standard Vertical Roman Alignment from its editing data
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.
2026-11-09 00:35:02 +07:00
dotCooCoo 41d3ac15e0 Type: docs say Escape returns to the tool active before type editing began 2026-11-09 00:34:51 +07:00
dotCooCoo bf4a9d00ab Type: docs say Escape returns to the tool that double-clicked into the type
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.
2026-11-09 00:34:50 +07:00
dotCooCoo 867c836fe1 Legacy .ai: the type attributes warning covers kerning, margins, Align to Path and end brackets
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.
2026-11-09 00:34:44 +07:00
dotCooCoo fd91b29e20 SVG export: type on a path with Skew, 3D Ribbon, Stair Step or Gravity keeps its look
SVG viewers center each <textPath> glyph on its midpoint on the path and
turn it to follow the path, which is how the Rainbow effect draws. Type on
a path with any other effect and no spacing was written as a plain
<textPath>, so a viewer drew it as Rainbow. It is now written as outlines
with a warning, as type with an end bracket, Align to Path or Spacing
already is.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-09 00:34:39 +07:00
dotCooCoo eb30d6ef78 Tests: the torn-off strip test checks the palette windows were shown first
The drawer opens and closes before the strip and the toolbar, so the
test fails when the palette windows were already hidden, and opens again
at the end. The test checks the floating strip is the Pen group's and
the custom toolbar is Mine, shown.
2026-11-09 00:34:34 +07:00
dotCooCoo 5f0d3addf7 Tests: a torn-off strip or a new toolbar leaves the palette windows shown
The hidden-toolbar test now expects exactly one show command when the
flyout stops drawing, and the comment at palette_window_levels names
the All Tools drawer.
2026-11-09 00:34:34 +07:00
dotCooCoo cca9a42c6c Effects: Effect › SVG Filters applies the document's SVG filters as live effects
Squashed from #6200 onto main.
2026-11-09 00:34:23 +07:00
dotCooCoo b9aacded51 Tests: placed gradient tests check the whole gradient after Transform and Free Distort
The baked Transform and Free Distort tests now compare each placed
gradient's start, end, aspect and focal point with the expected values
within a tolerance, and the Transform test adds a turn with a scale.
2026-11-09 00:34:12 +07:00
dotCooCoo 732434b4e5 Effects: placed gradients move with Transform and Free Distort effects
A gradient placed with the Gradient tool stayed where it was when the
object's Transform or Free Distort effect moved, turned or scaled the
outline, so the shape slid across its own gradient.

The Transform effect now maps placed gradients by its own transform,
and each of its copies takes them as many times as it takes the
transform. Under Free Distort, each path's placed gradients move and
scale from the path's bounds before the effect to its bounds after it.
This change does not alter gradients fitted to the object.

The canvas, Expand Appearance and export, Pathfinder and compound
shapes, groups, a fill's or stroke's own effects, and Object › Expand
of a gradient fill apply the same rule. In a group, the own fills and
strokes of the group, of the groups inside it and of a symbol's art
follow it too, and images and symbol instances that a group's
Transform effect moves take the placed gradients of their own fills
and strokes along. A group whose path keeps its shape because the
effect would pass the geometry budget keeps its own gradients in
place.

This changes how existing documents draw: a gradient placed on a path,
or on an image's or symbol instance's own fill, inside a group with a
Transform effect now moves with it. Before, only the gradients of type
moved (#2214).

How gradients follow each effect is VectorCraft's own rule. The
Distort & Transform help page describes what the effects do to the
object:
https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/distort-and-transform-effects-in-illustrator.html
2026-11-09 00:34:12 +07:00
dotCooCoo 332e115b68 Plug-ins: the bulk memory fuzz generators follow the paint generators
Moves the bulk memory case types, strategies and their test after arb_paint, so they no longer share the lines after output where other fuzz generators are added.
2026-11-09 00:31:14 +07:00
dotCooCoo 44432a4310 Plug-ins: the fuzz test generates bulk memory operations
plugin_fuzz now builds plug-ins whose run executes memory.fill,
memory.copy (overlapping ranges included), memory.init followed by
data.drop, and data.drop followed by memory.init. Lengths and offsets
are sampled at zero, small, page and mebibyte sizes, at an exact end,
one before and one past it, with copy sources and destinations and init
memory and segment offsets chosen separately. Fill and copy can repeat
up to about one fuel slice of copying.

Each case runs directly under the default budget, a small fixed budget
or one near its estimated cost. A run must trap exactly when a range
leaves memory or the data segment (empty once dropped), and must finish
when it is in bounds and has ample fuel; otherwise it may hit the
instruction budget. The same plug-in then runs through plugin.run: a
failed run leaves the document unchanged and the document still renders
and exports.

bulk_memory_cases_reach_their_instruction checks that each operation's
module contains its instruction and traps on a small out-of-bounds case.
2026-11-09 00:31:14 +07:00
dotCooCoo 51bab66409 Envelopes: document how a straight segment's handles count in the top object corner test
A top object's corner test treats a straight segment as having its
handles a third of the way along it, so an anchor between two straight
segments is a corner only when it turns out of the outline. docs/mcp.md
and the doc comment now say so, and a new test covers an inward anchor
between straight segments. The bulging-curve corner test checks against
a fixed point instead of the same nearest-point routine the code uses.
2026-11-09 00:31:07 +07:00
dotCooCoo ed6c0d434f Envelopes: a top object's corners keep their saved anchors when reflected
Saved corners from an .ai file stay on the same anchors when the
envelope is reflected, as they already did when it was moved or
rotated. A reflected outline runs counter-clockwise; the corners were
then mapped as if the outline had been drawn the other way round, no
longer fit it, and were found again from the outline.

On a tie between two corner anchors, or two nearest outline points,
the one met first along the outline in the order it was drawn wins,
for outlines drawn counter-clockwise too.

The docs state the corner rule in full: a handle 0.01 pt long or
shorter makes an anchor a corner whichever way it turns; otherwise its
tangent unit vectors must differ by 0.01 or more in x or y and turn
out of the outline. Content spreads evenly along a segment without
handles.
2026-11-09 00:31:07 +07:00