Commit Graph
5162 Commits
Author SHA1 Message Date
Don Omondi 74b5966bbd Stroke Weight Up and Down: Cmd/Ctrl+Alt+. and , step the selected strokes' weight (#5797) 2026-11-06 16:19:37 +07:00
Don Omondi 41ceaadc7e SVG import: Gaussian blurs keep color-interpolation-filters; Gaussian Blur can blur in linear light (#5877) 2026-11-06 16:05:55 +07:00
Don Omondi dbbe8a9298 PDF and .ai export: objects' URLs become clickable links (#5785)
Each visible object with a URL (Attributes panel) is written as a Link
annotation with a URI action over its bounds on the page, trimmed to its
clipping groups. Hidden objects, non-printing layers and printed sheets get
none; PDF/X files leave them out with a warning. URIs are percent-encoded
to 7-bit ASCII.
2026-11-06 15:48:02 +07:00
dotCooCoo d58d47312f Legacy .ai export: black-and-white colorized images save as image masks
A colorized image whose pixels are all black or white (or clear) is
written as a 1-bit image mask (ImageMask 1): its color as the fill, a 0
bit for each black pixel and a 1 bit for each white or clear one. The
legacy reader opens it colorized again with the same clear pixels, so
the engine no longer flattens or omits it. Other colorized images are
written with their color in their pixels, over white, with the note
for transparent images.
2026-11-06 15:33:35 +07:00
Don Omondi 427ec0017c SVG import: gradients with color-interpolation="linearRGB" mix their stops in linear light (#5878) 2026-11-06 15:33:02 +07:00
dotCooCoo 968bf1dc48 .ai import: a pattern or color named as another swatch keeps its swatch
Squashed from #5903 onto main.
2026-11-06 15:33:00 +07:00
Don Omondi 149eee2c70 Blend spine: moveAnchor refuses with alongside handle; spine built once per overlay and drag
object.blend.spine.moveAnchor now refuses any supplied `with` (even an
empty list) together with `handle`. Direct Selection builds the blend
spine once when drawing the picked points and once per drag preview,
instead of once per picked point. Part of #5285.
2026-11-06 15:32:52 +07:00
dotCooCoo 8f81e142a5 Reject invalid Tab Stop string parameters 2026-11-06 15:20:17 +07:00
Don Omondi 00b09002cf Layers: Rename opens the selected layer, group or object's name field (#5324) 2026-11-06 15:14:20 +07:00
dotCooCoo f48ac15d08 Text: a restyled empty frame keeps its style before an unedited empty frame
When a frame's text ends with a paragraph break and the next frame is empty, restyling that empty frame was undone on reflow: an unedited empty frame after it gave the story's last paragraph its own style again. A restyled empty frame now keeps its style against unedited empty frames that follow it. Unedited empty frames before it, later frames with text and later restyled frames still give the paragraph their style, as before.
2026-11-06 14:56:28 +07:00
Adithya Shankaran a455e72bf8 Automation roots: refuse COM¹ to LPT³ as Windows device names 2026-11-06 14:34:58 +07:00
Patrik LermonandClaude Opus 5.5 d98e8e44c7 i18n(sv): translate 1432 new strings, use the agreed terms in 2
Brings the Swedish catalog up to date with upstream main (4fc4c6576).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 14:21:42 +07:00
jayzed80 543b0de0b4 fix(eps): bitshift by the most negative integer no longer overflows on negation
Negating i64::MIN panicked in debug builds. Use saturating_neg, as Op::Neg already does.
2026-11-06 14:21:38 +07:00
dotCooCoo b0f383a1ab Text: empty later frames preserve an edited paragraph style 2026-11-06 14:08:37 +07:00
dotCooCoo b5da39d7b5 Commands: true/false flags reject other values everywhere
The remaining flags under crates/engine/src/cmd that read a boolean with
get(..).and_then(Value::as_bool).unwrap_or(..) now go through switch_or,
so a value such as "false" or 1 is an error instead of the default.
Omitting a flag or giving null keeps the old behavior.

- effect.move: copy
- aligned on the appearance.*, stroke.set, transparency.set and effect.*
  commands, checked before any early return
- transparency.viewOpacityMask: on
- view.printTiling: on
- plugin.install: replace and allowHeavy, checked for every plug-in
- edit.clear: guides, and path.deleteAnchors' read of it
- text.create and text.createInPath: vertical (already refused by
  check_switches, so their behavior is unchanged)
2026-11-06 13:47:16 +07:00
dotCooCoo 31456a0cec .ai import: a file whose editing data has no layers also opens on its active artboard 2026-11-06 13:47:16 +07:00
dotCooCoo aac21aa076 .ai import: legacy type keeps one copy of tab stops its paragraphs share 2026-11-06 13:22:36 +07:00
dotCooCoo e6819a86f0 Rendering: open width-profile strokes outline only near the view 2026-11-06 12:42:33 +07:00
dotCooCoo b75b1548d4 Tests: a fitted text test changes its fit scale
The regression test for rebuilding fitted area type after a scale change
used text that overflowed at the minimum size both before and after the
change, so both layouts used the same fit scale and the pixel comparison
did not depend on the fit.

The fixture is now 2 pt type in a small frame, drawn 20 times zoomed in.
It fits at 0.7 of its size, and at 0.733 after a 1.5 times scale. The
test asserts that the two fit scales differ and that the words set at the
earlier fit draw different pixels, and keeps the comparison with a fresh
renderer and the check that the geometry is not reused.
2026-11-06 12:42:26 +07:00
ruchirguitar 70f798b71d i18n: add Hindi interface and message catalog 2026-11-06 12:40:10 +07:00
dotCooCoo 2fa3276789 Selection: empty-canvas hover skips distant widgets in large selections 2026-11-06 12:06:27 +07:00
dotCooCoo 64c38d29c7 Reuse hit result for Direct Selection cursor 2026-11-06 11:31:21 +07:00
dotCooCoo 8a730bab6b Reject invalid New Art Basic parameters 2026-11-06 11:15:35 +07:00
dotCooCoo 0416f115e0 Speed up hover hits on long plain paths 2026-11-06 11:00:14 +07:00
dotCooCoo b26bd3d472 Reject invalid Guide Lock parameters 2026-11-06 10:41:08 +07:00
dotCooCoo 49583ef632 .ai import: symbol, pattern and brush definitions share the file's blend and envelope limits
Each definition's reader started with fresh blend layout and envelope
check budgets, so a file with many symbols, patterns or brush art
sections got those limits again for every definition. The reader of a
definition now takes the import's remaining budgets and hands back what
is left after reading, whether the definition is kept or not.
2026-11-06 10:28:08 +07:00
dotCooCoo 398131b9cc Reject invalid Transparency Grid parameters 2026-11-06 10:12:42 +07:00
dotCooCoo 48a3710fae Reuse selected object locations for large transforms 2026-11-06 09:58:43 +07:00
dotCooCoo b4a4f2aa4f Reject invalid Slice toggle parameters 2026-11-06 09:42:35 +07:00
dotCooCoo 25da816a08 Rebuild fitted text geometry after scaling 2026-11-06 09:37:22 +07:00
dotCooCoo a723f7359a Reuse text outlines across moves 2026-11-06 08:51:36 +07:00
Don Omondi ae3490d3ba Properties: Edit Artboards shows a Transform section above the artboard options (#5219)
With the Artboard tool, the Properties panel now starts with a Transform
section: the reference point shared with the Transform panel and the
Control bar, the active artboard's X and Y (of that point), W and H with
the Constrain Width and Height Proportions link, its preset and
orientation, and Move and Scale Artwork with Artboard. The Artboards
section follows with the name, Artboard Options and Fill. A new W or H
now keeps the reference point in place, as in the Transform panel.
2026-11-06 08:34:46 +07:00
bflatastic 138bab6fd3 Tests: the Cmd bounding box test clears its texture delta
The render worker's frame can land in any of its frames, and dropping a
delta that is not empty panics.
2026-11-06 08:34:25 +07:00
Don Omondi e1439bfe33 Scrubby labels: the Control bar's Stroke: and Opacity: links scrub their fields (#4088)
The Control bar's Stroke: and Opacity: and the Properties panel's Stroke
are links to their panels, so a drag on them did nothing while every
other field label scrubbed its field. A drag on such a link now scrubs
the field after it (same steps and modifiers, one undo step, Escape
cancels); a click still opens the panel, and the link's text is not
selected by the drag.
2026-11-06 08:11:10 +07:00
bflatastic cc0575f15d Tests: two canvas tests render on their own thread
A document's first frame goes to the render worker, and these read the
texture right after it, so under load it had not landed yet.
2026-11-06 08:10:45 +07:00
Don Omondi 97697420f9 Variables: Load Variable Library keeps a bound text variable the library declares (#4136)
Loading a variable library deleted every variable of the document with its
bindings, including a text variable of the same name that the library
declares. Text made dynamic and then given a library's variable name lost its
binding, so selecting the library's data sets changed nothing. Such a
variable now stays bound, and the library's data sets change its text; other
variables are deleted as before.
2026-11-06 07:45:21 +07:00
Don Omondi 283c0d12bb Effects: an image's Inner Glow follows its visible pixels, not its frame (#5308)
Inner Glow clipped to the art's outline and bled in from outside it; for a
placed image that outline is the frame, so a PNG with transparent areas
glowed along the frame's edge, over pixels that don't show. For an image the
glow is now cast by its pixels' alpha (everything around them, blurred, or
the pixels themselves with Center) and kept to where the image shows, as
much as it shows.
2026-11-06 07:25:10 +07:00
Don Omondi 1f7f341c21 Properties: Quick Actions has Repeat Options for a selected repeat (#5181)
One selected radial, grid or mirror repeat (or one object of its source
art in isolation mode) shows a Repeat Options button in the Properties
panel's Quick Actions. It runs Object › Repeat › Options, opening the
Repeat Options dialog with the repeat's current values.
2026-11-06 07:23:39 +07:00
Don Omondi f987c2bbb0 Intertwine: the object brought over leaves no hairline of the one below (#5337)
The area an Intertwine member is drawn over another in was exactly the
overlap face, so its edge lay on the edge of the member below. Both edges
were anti-aliased, and the member below showed through as a thin line along
them. The area now reaches 2 pt past the face into the parts where only the
raised member paints (where drawing it again changes nothing), so its edge
lies inside that member.
2026-11-06 07:23:35 +07:00
Simon Hull c15383c510 Images: an image zoomed in on has its colours made only for the tiles in view (#4155)
From about 50% zoom on the file of #4155, the pixels drawn are the full 141-megapixel photo,
and in a CMYK document they were separated into ink planes (or colorized, or proofed) whole
for every view: 8 to 9 s of white canvas a zoom step.

When the pixels drawn are larger than a 1,024-pixel tile, their colours are made again for the
frame and part of them is out of view, only the tiles in view are made, each kept under its own
key (`ImageKey::tile`), and drawn together as one pixmap so their edges don't show. The colours
are made pixel by pixel, so the result is the same as for the whole image. CMYK images painting
their own inks are still made whole.

Zooming in to 50%, 100% and 200% on that file went from 9.0, 8.6 and 8.7 s to 0.78, 0.05 and
0.05 s (M3 Pro, one run each), with the same pixels on screen.
2026-11-06 07:23:32 +07:00
Kushagra Kumar 316f0d6213 SVG import: clip path on clipPath children clips child silhouettes before union (#5841)
Squashed from #5855 onto main.
2026-11-06 07:23:31 +07:00
Don Omondi dfe628e906 Blend spine: Shift-click picks several spine points, which drag together (#5285)
Direct Selection kept only one picked point of a blend's spine. Shift-click
now adds a point of the same spine or takes it away, and dragging any picked
point moves them all. object.blend.spine.moveAnchor takes `with`, the other
points to move by as much, with the key objects on them, in one undo step.
2026-11-06 07:23:19 +07:00
Don Omondi 8236a8e006 SVG import: textLength and lengthAdjust fit text to its length (#5842)
SVG text with a textLength came in at its natural width. Following
SVG 1.1 §10.9.1, the characters of each text or tspan with a textLength
are now fitted to it: by spacing them out (lengthAdjust="spacing", the
default), which becomes kerning, or by stretching them
(spacingAndGlyphs), which becomes horizontal scale (kept within
1–10000%). Inner elements are fitted first; vertical text is spaced out
only, with a warning for spacingAndGlyphs. Negative lengths are ignored.
2026-11-06 05:38:51 +07:00
Don Omondi 483de72dbb Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box (#3901)
Squashed from #5851 onto main.
2026-11-06 05:33:00 +07:00
Don Omondi b976de560d Join tool: scrubbing the ends of two crossing paths trims them and joins the paths at the crossing (#5844)
The Join tool drew a segment between the open ends of two crossing paths
instead of trimming what overhangs the crossing. path.joinScrub now looks for
two crossing open subpaths whose overhanging ends the scrub runs over, cuts
both at the crossing and joins the kept parts there with a corner, in one undo
step. Without a crossing the endpoint join is unchanged.
2026-11-06 05:32:24 +07:00
Don Omondi 446c3f071f SVG import: a clipPath's children clip to their union, each under its own clip-rule (#5840)
A clipPath with several children was imported as one compound path under
the first child's fill rule, so children wound in opposite directions
cancelled where they overlapped, and an even-odd child after a non-zero
one lost its hole. SVG 1.1 §14.3.5 defines the clip as the union of the
children's silhouettes, each computed on its own.

A clipPath with several children now comes in as a group of them as the
clip group's clipping path, each child keeping its own rule; a group
clips to the union of its members. One child imports as before.
2026-11-06 05:32:19 +07:00
bflatastic 887f59c7a3 Tests: the first-frame worker test tolerates another test's placed document
The frame key holds the process-wide placed-document generation, so a test
running beside this one could make a new frame between the two it compares.
2026-11-06 05:32:18 +07:00
Simon Hull af31e1464c Canvas: a document's first frame renders on the render worker (#4155)
A document's first frame (opened, or its tab chosen) rendered on the UI thread: only a
document with a frame already shown sent its frames to the worker. A heavy file froze the
window until it was drawn, 8.7 s for the file of #4155 and 1.4 s for a 50,000-path SVG.

The first frame now goes to the worker too, and the window shows the document's paper and
artboards until it lands. The UI thread waits for it up to FIRST_FRAME_GRACE (16 ms) when it
is queued (`Worker::wait`; `submit` says whether it queued), so a light document's art still
shows in the same frame. The longest UI-thread stall opening those files is now 64 ms and
62 ms (M3 Pro, one run each). The web build, which has no worker, is unchanged.
2026-11-06 04:55:02 +07:00
Zinadin ZidanandClaude Opus 5.5 d04585f6d2 Control bar: Paragraph options while type is selected (#5372)
With type selected the Control bar now shows a "Paragraph:" link, which
opens the Paragraph panel in a popover as Character: does, and Align
left/center/right. The bar now trims strictly from its right end as it
narrows: X/Y/W/H, Distribute, object Align, area type's vertical alignment,
then the Paragraph buttons, then the link, each group measured. That also
stops Align and Distribute running past the bar's edge for other
selections. On a 1440 pt bar with one point type object the buttons show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 04:54:35 +07:00
.CooCoo 36c73f7bb9 Type: Enter, arrows, Home, End, Tab and the clipboard apply in order with the frame's text (#2636)
* Type: a Backspace and the text typed after it in one frame apply in order

The Type tool received all of a frame's typed text and IME events
first, and the frame's Backspace, Delete, arrows, Home, End, Tab and
clipboard keys afterwards. Enter went to the tool before the text, and
several Enters in one frame added one line break.

A phonetic keyboard tool can replace a character it typed by sending a
Backspace and the new character: ন for n, then a Backspace and ং when g
follows. When the Backspace and ং arrived in one frame, ং was inserted
and then deleted, so ন was left where ং belonged (#2615).

route_type_input now takes the frame's text, IME events, editing keys,
Enter and clipboard events in one pass, in the order they came. The
Type tool still drops the keys of a frame that began with IME marked
text, and the keys that come while the IME composes. A key or clipboard
event that comes before a new composition in the same frame is now
applied instead of dropped, and an Enter in the same frame as an Escape
no longer types a line break.

* Type: a command bound to Cmd+Enter runs without typing a line break

While the Type tool edits text, Enter went to the tool as a line break
before the shortcuts ran, so a command bound to Cmd/Ctrl+Enter also
typed a line break. Enter now types a line break only when no command
is bound to its chord. Plain Enter, and Cmd+Enter with nothing bound
to it, type a line break as before.

* Type: Enter, arrows, Home, End, Tab and the clipboard go in type_text's ordered pass

Enter, the arrows, Home, End, Tab, Backspace and Delete with modifiers,
Type > Bold and Italic, and the clipboard events now join the ordered
pass in type_text that takes text, IME events and plain Backspace and
Delete, instead of a separate pass that replaced it. route_type_input is
split into type_input, which takes one event, and apply_type_input.
Every event the Type tool takes, text and IME events included, is
removed from the input.

An Enter press whose chord a command is bound to stays in the input for
the shortcuts. The check uses chord_runs_a_command, which runs_a_command
now calls for each press, so the separate Cmd+Enter check in
route_type_input is removed. A plain Enter and a bound Cmd+Enter in one
frame type one line break and run the command.

hook_ime_backspace_and_reinject_builds_vietnamese covers a Backspace and
the text after it in one frame, so the Bangla test is removed. The order
test covers Home, End, Tab, a paste, and a key that comes before a
composition starts in the same frame.

* Type: editing keys after an IME commit apply in the same frame

In a frame that began with a composition, the Type tool dropped every
editing key, also one that came after the IME committed its text, so a
frame of a commit, ← and a letter typed the letter after the committed
text without moving the caret. Editing keys after a commit in that
frame now apply in order. A key that comes while the composition is
still open, and an Enter in a frame that began composing, still belong
to the IME.

* Type: Shift+Enter types a soft return when keys apply in order with the text

The ordered Type tool input passed Enter to the tool without its modifiers, so Shift+Enter typed a line break instead of the soft return main added. Enter now carries the key's modifiers.

* Type: test Home, Tab and Backspace against the frame's earlier text

A new test types text, Home and text in one frame, Tab inside a line,
and a paste followed by Backspace, and checks that each acts on the
text the earlier events left. It fails on main, where those keys apply
after all of the frame's text.

The Enter and Escape loop in shortcuts::handle skips Enter with
`skip` instead of an `if`, which keeps the function under main's
cognitive-complexity limit.
2026-11-05 22:22:47 +01:00