Commit Graph
504 Commits
Author SHA1 Message Date
Ahmed Gomaa 1d011ab8ad Render: a compound path's members are assembled once and kept with the node
A compound path was assembled from its members in every frame it was
drawn, and Node::stroke_path grew its buffer by doubling, copying the
path into ever larger buffers for a compound path of many anchors. The
renderer's geometry cache was swept only once it held more than 1,024
entries, so while an object was dragged (a new node, and layer, in
every frame) the old copies stayed alive with all their members.

Now:
- a compound path is drawn from the path the renderer keeps for it in
  its geometry cache, as a plain path already was, and is assembled
  only when the node changes;
- Node::stroke_path sizes a compound path's buffer up front from its
  members' segment counts (the same elements, in the same order);
- unused geometry entries are dropped after a few frames however few
  entries there are.

Tests:
- crates/render/src/tests/memory.rs: the second frame draws the kept
  path and the same pixels as the first and as a new renderer; after a
  five-frame move the renderer no longer holds the compound path drawn
  before it. The test fails without the renderer change.
- crates/doc/src/node/tests.rs: a compound path's path is its members'
  paths in order (open, closed, empty and single-anchor members).

Not timed; vectorcraft-cli perf was not rerun.
2026-11-03 16:03:40 +07:00
Ahmed Gomaa f0e72fb11a Selection: a click on a large compound path is culled by its control points
Every click and hover measured each path and compound path along its
curves to cull it (Node::reach_bounds_with), and a compound path was
then assembled whole to test its outline and fill. For a compound path
of thousands of members that took milliseconds per click.

Hit testing now culls paths and compound paths by the box of their
control points (which holds the curves), grown by their strokes' reach,
so the box is never smaller than the reach box it replaces. A compound
path's outline and fill are tested against only the members whose
control box, grown by the tolerance, holds the point: a member outside
that box is farther than the tolerance and winds zero times round the
point. Painted strokes still follow the whole compound path (alignment,
dashes, width profiles) and are measured along all of it, as before.

Tests (crates/doc/src/hit/tests.rs):
- a 2,000-member compound path hits exactly as the whole-path test did,
  at random points, on and next to anchors and on the edges of the
  members' boxes, for both fill rules, in Outline view and with Object
  Selection by Path Only;
- wide strokes painting past the control points are still hit, for a
  path and a compound path;
- the cull box holds the reach box for paths and compound paths.

Measured in a debug test build (one run, machine not idle): a click on
a 20,000-member compound path went from about 18 ms to about 1 ms.
vectorcraft-cli perf was not rerun.
2026-11-03 16:03:40 +07:00
dotCooCoo 2b29a680f3 Objects on Path: the Space widget spaces the attached objects along the path
With one Objects on Path group of two or more objects selected, the
Selection and Objects on Path tools show a square Space widget beyond the
last object, ahead along the path. Dragging it moves the last object
along the path, around its bends, as far as the pointer moves along it,
and the objects between follow evenly while the first one stays. With
Alt (Option on macOS) the objects spread from both ends toward or away
from the center of an open path, or of the first anchor of a closed one.
The distance between the objects shows next to the pointer in the
document's units; the drag is one undo step, and Escape cancels it.

- object.objectsOnPath.options takes spacing (points, or "auto", the
  default even spread) and start (points from the first anchor). A
  spacing the path has no room for is drawn smaller and kept, so a
  longer path brings it back. Older files read as Auto.
- Moving the group, Pivot, Rotate, path edits, copies and saving keep
  the Space. Scaling, rotating or shearing the group keeps the first
  and last objects where the transform takes them on the new path, live
  shapes included; a value that cannot be kept that way scales with the
  path's length.
- The Rotate All widget follows the first object when Space moves it.

Behavior: https://helpx.adobe.com/illustrator/desktop/manage-objects/arrange-objects/rearrange-and-edit-objects-on-a-path.html
and https://helpx.adobe.com/illustrator/using/objects-on-path.html.
2026-11-03 16:03:40 +07:00
dotCooCoo 84e344c475 Character Styles: Style Options sets character color and OpenType features
Character Style Options and New Character Style get a Character Color
section and an OpenType Features section.

Character Color sets the fill and stroke (None or a document swatch;
a global swatch or a tint of one stays linked, with a Tint from 0% to
100%), the stroke Weight, and Overprint Fill and Overprint Stroke. A
gradient or pattern paint the style already has stays until another
paint is chosen.

OpenType Features sets Figure, Position, Standard and Discretionary
Ligatures, Contextual, Stylistic and Titling Alternates, Swash,
Ordinals, Fractions and Stylistic Sets 1 to 20. A changed control
replaces only its own tags in the style's feature list, so other tags
stay, and Default Figure and Default Position are stored as their
features turned off, distinct from unset.

Empty controls stay unset, and each section's Reset Panel clears only
its own attributes.

charStyle.new, charStyle.edit and charStyle.setAttrs check a changed
fill, stroke, stroke weight or feature list: tints from 0 to 1, links
to global swatches of the document (the color follows the swatch),
weights from 0 to 4000000, and known feature tags, at most 256. Values
the style or the text it is made from already has are kept.
charStyle.duplicate keeps the copied style's values in the same way, so
a style with a language tag that is not in the list can be duplicated.

Editing a global swatch now also updates the fill and stroke stored in
character styles, so their text no longer shows as overriding the style
and text styled later takes the new color. swatch.unused counts a swatch
a character style links to as used.
2026-11-03 16:03:39 +07:00
Brandon Thomas 065a646799 Merge pull request #5280 from dotCooCoo/feat/symbol-nine-slice-guides-on-canvas
Symbols: 9-slice guides are shown and dragged on the canvas while editing a symbol
2026-11-03 00:19:44 -05:00
Brandon Thomas 9134297774 Merge pull request #5294 from storytold/fix/sec-depth-limit-linear
Depth limit: merge containers at the cap in one pass over the siblings
2026-11-03 00:19:15 -05:00
Brandon Thomas c1c5fcb625 Merge pull request #5292 from storytold/fix/sec-page-range-linear
Page ranges: overlapping intervals skip indices already picked
2026-11-03 00:19:11 -05:00
Brandon Thomas b72215e71a Merge pull request #5290 from storytold/fix/sec-repeat-copy-budget
Repeat: the instance budget counts opacity-mask art and the nodes each copy holds
2026-11-03 00:19:08 -05:00
Brandon Thomas 70e32e449b Merge pull request #5289 from storytold/fix/sec-dxf-export-budgets
DXF export: bound curve flattening work and expanded symbol art
2026-11-03 00:19:04 -05:00
Brandon Thomas cc1d906c4c Merge pull request #5259 from dotCooCoo/fix/tcy-style-offsets-in-range
Type: Tate-chu-yoko offsets in character style definitions stay in range
2026-11-03 00:18:32 -05:00
Dylan M. Taylor ed4a663986 DXF export: charge symbol art as it is placed unclipped, test the segment budget
Count nine-slice symbol art with clips off, as place_symbol_art_unclipped
places it, so art crossing the guides is not over-charged; add a test that
the flattening segment budget stops a path independently of the point
budget; format.
2026-11-02 22:33:39 -05:00
Dylan M. Taylor f8f9280d75 Repeat test: drop the full-budget expand from the large-source test 2026-11-02 21:31:03 -05:00
Dylan M. Taylor 1ad4233846 Page ranges: overlapping intervals skip indices already picked
parse_range walked every index of every interval, so a range that names
the same pages many times ("1-,1-,1-,...") cost the number of parts
times the page count. Picked indices now link to the next unpicked one,
so each page is visited about once whatever the overlap.
2026-11-02 20:33:30 -05:00
Dylan M. Taylor 09d8872f15 Depth limit: merge containers at the cap in one pass over the siblings
limit() replaced each too-deep container by its children with
Vec::splice in the middle of the sibling list, moving every later
sibling each time: a wide list of such containers took quadratic time
to load. The list is now rebuilt in order from a worklist, so each node
moves a bounded number of times.
2026-11-02 20:33:29 -05:00
Dylan M. Taylor f204445119 Repeat: the instance budget counts opacity-mask art and the nodes each copy holds
A Repeat kept up to 250 000 instances whatever its source held, and the
nested-instance count skipped the art of opacity masks. Expanding copied
the whole source for every kept instance, and a Repeat inside an enabled
mask was evaluated again for each outer copy.

The budget now counts the Repeats inside enabled opacity masks, and keeps
a second bound, MAX_REPEAT_COPIES, on the nodes and path anchors copied
in all (nested Repeats included).
2026-11-02 20:33:27 -05:00
dotCooCoo 33f429972b Merge main (11862f61) into feat/native-save-precision 2026-11-02 16:29:45 -08:00
dotCooCoo b63517df7f Symbols: a dragged 9-slice guide keeps its place when saved guides are closer than the minimum band
A guide whose saved position leaves a center band narrower than the minimum no
longer jumps to the art's edge when a drag does not move it closer to the
opposite guide. The 9-slice scaling line in docs/target-app-parity.md no longer
says guides are not drawn in symbol editing mode.
2026-11-02 13:16:49 -08:00
dotCooCoo 931e94cdea Symbols: 9-slice guides are shown and dragged on the canvas while editing a symbol
While a symbol with Enable Guides for 9-Slice Scaling on is edited in
symbol editing mode, the canvas draws its two horizontal and two vertical
guides as dotted lines across its art, with any tool and with ruler guides
hidden. With the Selection tool the pointer near a guide shows the Move
cursor, and dragging the guide sets it through `symbol.options`'s
`nineSliceGuides` as one undo step; Escape during the drag puts it back.

A guide within 4 screen pixels takes the press before the art and the
bounding box. A dragged guide stays within the art's box and stops short
of the opposite guide; positions outside the art are not supported yet.
2026-11-02 12:38:33 -08:00
dotCooCoo 588ff039a9 Type: Tate-chu-yoko offsets in character style definitions stay in range
A character style whose Up/Down or Left/Right offset lies past MAX_COORD
either way now opens with the nearer end, as text runs already do, so
text that takes the style no longer gets the out-of-range offset. An
offset within range is not rewritten.
2026-11-02 06:32:52 -08:00
dotCooCoo 8ab68e4223 .ai import: open the variable library and data sets from the editing data
Squashed from #5156 onto main.
2026-11-02 16:19:19 +07:00
dotCooCoo 83f2bfe9d6 Symbols: a scaled instance of a symbol with 9-slice guides keeps its corners and edges unstretched
Squashed from #5079 onto main.
2026-11-02 15:22:07 +07:00
dotCooCoo e68bf6af55 Variables: art on a locked artboard is not bound or rewritten by a data set
Squashed from #5118 onto main.
2026-11-02 15:21:58 +07:00
FarmerGeorg 9c59a4dcb4 Appearance panel: UI parity for row editing
- Drag strokes, fills, characters and effects to move them, or drop them
  on the Duplicate or Delete button
- Select several rows with Shift/Cmd-click and move them as one block
- Delete and Backspace remove the highlighted rows, not the selected art
- Row links open their panel (Stroke, Character…) as a flyout
- Stroke weight spinner follows Units > Stroke
- Transparency panel edits the active fill's or stroke's opacity
2026-11-02 14:36:09 +07:00
Taha-Mahmoodi 1b5d11ef4b Units: Preferences › East Asian Type reads, with Q and Ha units (#394)
Squashed from #4845 onto main.
2026-11-02 14:36:08 +07:00
dotCooCoo e8e09af782 Brushes: Calligraphic and Scatter values follow pen tilt, bearing and rotation
Squashed from #5031 onto main.
2026-11-02 14:33:02 +07:00
dotCooCoo e13cf73ae0 Type: Tate-chu-yoko Settings move a block up, down, left or right
Squashed from #5206 onto main.
2026-11-02 14:32:59 +07:00
dotCooCoo f46427167c .ai import: area type keeps its rows, columns, gutters and first baseline
Area type made from the editing data's text document came in with one
row, one column, the 18 pt gutter and the Ascent first baseline,
whatever its frame kept. Each area frame now keeps its rows and columns,
the gutter between rows and the gutter between columns, and its first
baseline (Fixed, Cap Height, Leading or x Height) with its minimum,
scaled with the art's units. Each frame of a thread keeps its own, and a
key that is missing or can't be read leaves that option as it was. A
first baseline the frame keeps is no longer replaced by the fixed one
that matches the file's first line.

AreaOptions gets row_gutter (rowGutter, left out while unset), which
layout spaces rows by; text.areaOptions takes and reports rowGutter, a
gutter given alone sets both, and the Area Type Options dialog shows
Row Gutter.
2026-11-02 12:04:07 +07:00
dotCooCoo d4f5004580 .ai import: area type flows around its text wrap objects
Fixes #2763. An object whose editing-data dictionary holds the text wrap
options keeps them (offset in points, 6 pt by default, clamped to
±1000 pt; Invert Wrap), and the objects after the text in a version 7
wraparound group (`*w` … `*W`) are wrap objects at the default options.
Area type below a wrap object in its layer flows around it before the
layers are compared with the page, and threaded type flows on into its
next frames. A Large Canvas file's offset is scaled with its art.

The wrap resolver moves into `vectorcraft_doc::text::resolve_wrap` for
the import and the edit-time refresh, and builds each wrap object's
outline once per layer. A file whose wrap shapes would copy more than
2,000,000 anchors is not read from its editing data.

Docs: docs/file-format-parity.md.
2026-11-02 12:04:05 +07:00
Brandon Thomas fceaf44fd0 Merge pull request #5138 from dotCooCoo/fix/vars-p6
Variables: a text value on threaded type replaces the whole story
2026-11-01 15:27:58 -05:00
dotCooCoo be20929877 Variables: a text value on threaded type replaces the whole story
Applying a data set wrote a text value into the bound frame only, and the
thread's reflow then joined it with the other frames' old text. The art no
longer matched the row it had just applied, a captured row applied back lost
text, and a value bound to a later frame deleted the rest of the story.

- A text value bound to any frame of threaded text replaces the whole story,
  which then flows through the frames again. `overflow` names the story's
  last frame.
- Capture Data Set, Update Data Set and the Variables panel's match check
  read such a frame as the whole story, frames joined in thread order.
- When any frame of the story is locked, the text value is skipped and
  counted in `skipped`, and the story is not read.
- Two text variables bound in one story apply in definition order, as for
  two on one object: the one defined last wins.

Docs: docs/mcp.md.
2026-11-01 08:58:35 -08:00
dotCooCoo e49e102032 Variables: Lock Variables' description names the refused import
variable.lock's params text and the doc comment on Variables::locked said every
dataset command still runs while the variables are locked. dataset.import is
refused when its header would define a variable; both texts now say so, as
docs/mcp.md and dataset.import's params already do.
2026-11-01 08:43:56 -08:00
dotCooCoo ff036557fb Symbols: Edit Symbol opens the symbol in its own editing mode, and every instance follows each edit
Squashed from #5064 onto main.
2026-11-01 11:09:03 +07:00
dotCooCoo 427bce12b0 Character: Font Size can measure the cap height, x-height or ICF box
Squashed from #5026 onto main.
2026-11-01 11:08:55 +07:00
dotCooCoo 8362b7532c Eyedropper: Shift-click samples a blend's steps and an envelope's distorted art
Squashed from #4949 onto main.
2026-11-01 09:24:18 +07:00
dotCooCoo 891766a5ed Native format: precision rounds Intertwine areas of every tier
A save with precision rounded the tier-1 Intertwine area but left the
areas of tier 2 and up exact. The format test now gives the object a
tier-2 area too, and sets the symbol's new dynamic field.
2026-10-31 18:34:18 -07:00
dotCooCoo ece78f052f Type: Standard Vertical Roman Alignment stands half-width characters upright in vertical type
Character panel menu > Standard Vertical Roman Alignment, with Show East
Asian Options, is now a check item. It sets a new character attribute,
`standardVerticalRoman` (text.setFormat, text.setRangeStyle), off by
default and saved only when on. In vertical type the marked Latin
letters, digits and other characters that would lie on their side stand
upright one below the other, each in its upright cell. Spaces keep their
width and tate-chu-yoko blocks stay across the column. Horizontal type
keeps the mark and does not change. A combining mark shaped as its own
glyph turns with its letter, in Latin and CJK upright type alike.

Character Style Options labels the Character Alignment row "Character
Alignment" and gives Standard Vertical Roman Alignment its own checkbox.
Reset Panel turns the attribute off. PDF and SVG export place the glyphs
from the layout and need no change.
2026-11-01 08:32:55 +07:00
VladimirCericandClaude Opus 5.5 13dd4f9086 Languages: keep other apps' names out of the comments and docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011wCJ9DkszhZKxYL3LgcSfZ
2026-11-01 07:38:03 +07:00
VladimirCericandClaude Opus 5.5 d440b6d32b Languages: cite the quote sources (Pravopis ISBN, CLDR links)
From the CodeRabbit review: the Serbian and Croatian quote marks name
their sources with the Pravopis's ISBN and links to CLDR's sr and hr
data, in the code and in docs/type-parity.md; the quotes test says what
it checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011wCJ9DkszhZKxYL3LgcSfZ
2026-11-01 07:38:03 +07:00
VladimirCericandClaude Opus 5.5 c492d524c5 Languages: Serbian (Cyrillic, Latin) and Croatian, with their quote marks
Document Setup and Character › Language list Serbian: Cyrillic (sr-Cyrl),
Serbian: Latin (sr-Latn) and Croatian (hr). Text tagged Serbian is shaped
in it (#4940, #4959), so fonts draw their Serbian forms, the italic б,
г, д, п, т. Serbian quotes follow the Pravopis (Matica srpska 2010,
т. 168) and CLDR: „…” and ’…’; Croatian per CLDR: „…“ and ‚…‘.
Illustrator lists Croatian but not Serbian.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011wCJ9DkszhZKxYL3LgcSfZ
2026-11-01 07:38:03 +07:00
dotCooCoo caafc2a02a Merge main (433ddb59) into feat/native-save-precision 2026-10-31 17:22:00 -07:00
bflatastic 7d8f1d4e06 Fix #4978: Area Type Options › Text Flow by rows or by columns 2026-11-01 06:11:11 +07:00
bflatastic f22caa6108 Fix #4938: Dynamic symbols keep per-instance appearance linked to the symbol 2026-11-01 04:53:38 +07:00
bflatastic 9c17301c46 Fix #4937: artboards can have a background fill, included in exports and print 2026-11-01 04:13:57 +07:00
bflatastic b8365d6197 Fix #4942: native Indic digits in the Digits menu 2026-11-01 03:36:40 +07:00
bflatastic cf656e2b70 Gradient mesh tests: add_lines_at takes the click tolerance (#4954) 2026-11-01 02:07:08 +07:00
dotCooCoo 23da2fe461 Part of #3187: a gradient mesh made from an ellipse keeps its shape
Create Gradient Mesh and a Mesh tool click estimated each border edge's
handles from the surface's derivatives, so the mesh's border cut across a
curved outline: a 1x1 mesh over a 400 x 300 pt ellipse came out up to
7 pt off it, with corners at its four mesh points. Each border edge now
takes the handles of the cubic that best fits the outline between its
points, and handles where two border edges meet along a side stay
collinear.

Deleting a mesh line (Alt-click with the Mesh tool) joined the two edges
on either side with a straight line, which turned the ellipse's border
into a diamond. The joined edge now keeps the outer handles, grown back
to the length they had before the line split the edge.
2026-11-01 01:59:57 +07:00
bflatastic 2bdaaa8981 Fix #4946: a Language setting per text, with Indian languages (#4943)
Character panel > Language sets the selected characters' language;
text.setFormat and text.setRangeStyle take `language` by name or tag
(unknown: an error), and character styles carry it. Document Setup's
language list gains Hindi, Marathi, Gujarati, Bengali, Punjabi, Tamil,
Telugu, Kannada, Malayalam, Odia and Urdu, with catalog rows; the
Digits menu's numeral names move to a digits context, as Hindi is now
also a language name.
2026-11-01 01:39:16 +07:00
bflatastic a85487ad39 Fix #4940: text is shaped in its language
Characters get a language (CharStyle::language, a BCP 47 tag of one of
Document Setup's languages; none for the default, English: USA, saved
only when set). The shaper sets it on the HarfRust buffer, so fonts use
their language forms (OpenType locl): Turkish keeps fi apart and the dot
on its i. Runs in different languages are shaped apart. New type takes
the document's language.
2026-11-01 01:39:11 +07:00
NetterSilverandClaude Haiku 5.5 34563945a1 Replace non-finite type values in DocSetup::keep_in_range
Found while testing crates/doc/src/setup.rs:308-316 (keep_in_range)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 01:22:08 +07:00
dotCooCoo fc820cc066 Mesh: no edge search for a lookup without tolerance 2026-11-01 01:22:08 +07:00