Commit Graph
876 Commits
Author SHA1 Message Date
BFlat 8138a6e973 Merge pull request #7814 from dotCooCoo/feat/editing-one-anchor-copies-the-whole-anchor-list
Paths: editing one anchor of a long path keeps one chunk of anchors for undo
2026-11-15 17:31:01 +07:00
BFlat 0d277bc12e Merge pull request #7808 from dotCooCoo/fix/image-codes-created-inside-a-rolled-back-node
EPS: art left out at the page limit releases the images it encoded
2026-11-15 16:39:29 +07:00
BFlat c93b96ba1b Merge pull request #7783 from dotCooCoo/fix/opacity-mask-art-inside-symbols-pattern-tiles
.ai editing data: opacity mask art in symbols and pattern tiles keeps live effects
2026-11-15 15:46:39 +07:00
BFlat 7e7d229ac9 Merge pull request #7782 from dotCooCoo/fix/a-colorized-warped-image-decodes-its-coverage
Legacy .ai: a colorized warped image works out its coverage once
2026-11-15 15:44:35 +07:00
dotCooCoo b8b002a662 Merge main into feat/editing-one-anchor-copies-the-whole-anchor-list 2026-11-15 00:21:39 -08:00
dotCooCoo 456910f03f Merge main into fix/image-codes-created-inside-a-rolled-back-node 2026-11-15 00:01:54 -08:00
BFlat 6fe176f997 Merge pull request #7428 from dotCooCoo/feat/ai-save-nested-envelope
.ai save: type in an envelope stays editable
2026-11-15 14:42:55 +07:00
dotCooCoo 42658d2efc Merge main into fix/image-codes-created-inside-a-rolled-back-node 2026-11-14 22:55:46 -08:00
BFlat 0cef4fa727 Merge pull request #7743 from dotCooCoo/fix/legacy-ai-artboard
.ai import: legacy PostScript .ai files open on their own artboard
2026-11-15 13:50:00 +07:00
dotCooCoo b64ee486f9 Merge main into fix/opacity-mask-art-inside-symbols-pattern-tiles 2026-11-14 22:26:08 -08:00
dotCooCoo 50f2b2d07c Merge main into fix/a-colorized-warped-image-decodes-its-coverage 2026-11-14 22:25:49 -08:00
dotCooCoo 8ad2ecdc40 EPS: an image left out at the page limit is encoded again only once it fits
Each later placement of an image or a colorized image that was turned away at the page limit
was decoding and compressing it again. The scene now remembers what the first placement of a
turned-away encoding adds to the page and leaves later placements out with the same warning
while that still doesn't fit. Once the page has room again, after art is taken back, the image
is encoded and placed as usual.
2026-11-14 22:16:34 -08:00
dotCooCoo 7104cd05f3 Merge main into feat/editing-one-anchor-copies-the-whole-anchor-list 2026-11-14 22:05:53 -08:00
dotCooCoo 260da1cb7b Merge main into fix/image-codes-created-inside-a-rolled-back-node 2026-11-14 21:56:22 -08:00
dotCooCoo 496cdb54f5 Merge main into feat/ai-save-nested-envelope 2026-11-14 21:44:34 -08:00
BFlat 6dd478a420 Merge pull request #7456 from dotCooCoo/feat/ai-save-envelope-case
.ai save: a top object with uneven sides stays a live envelope
2026-11-15 12:37:47 +07:00
BFlat acf04dd00f Merge pull request #7724 from dotCooCoo/fix/ai-off-artboard-art
.ai import: symbol instances in older files are read, so art outside the artboard opens
2026-11-15 12:37:39 +07:00
dotCooCoo a5493a1cd0 Paths: editing one anchor of a long path keeps one chunk of anchors for undo
A subpath's anchors are now an `Anchors` list held in chunks of up to
256 anchors behind `Arc`s. Copying a path copies the chunk table and
shares the chunks, and editing one anchor copies only the chunk that
holds it, so the undo step of a one-anchor edit no longer keeps a copy
of every anchor of the path. Inserting or removing an anchor copies the
chunk it is in and rebuilds the table. Reads and edits follow the Vec
and slice methods the code used; files write and read each subpath's
anchors as one list, as before, within the same anchor read budget.

The undo memory estimate counts only the chunks the other version of
the path does not hold, and the renderer's kept paths compare only the
chunks an edit copied when they look for moved anchors.

Moving one anchor of an open path of 10,000 or 200,000 anchors
(path.moveAnchor, path.setHandle, path.moveAnchors, a nudge) keeps at
most 48 KiB in its undo and redo steps, where it kept 56 bytes per
anchor.
2026-11-14 21:25:15 -08:00
dotCooCoo f88b0f9e17 Merge main into fix/image-codes-created-inside-a-rolled-back-node 2026-11-14 20:55:00 -08:00
dotCooCoo 71a2597220 Merge main into fix/a-colorized-warped-image-decodes-its-coverage 2026-11-14 20:51:10 -08:00
dotCooCoo 633c54820d Merge main into fix/opacity-mask-art-inside-symbols-pattern-tiles 2026-11-14 20:37:41 -08:00
BFlat 3ce7b256b6 Merge pull request #7735 from dotCooCoo/fix/ai-cs-type-from-editing-data
.ai import: files saved for version 11 take their type from the text document
2026-11-15 11:36:41 +07:00
dotCooCoo 57d6b3066e Merge main into fix/image-codes-created-inside-a-rolled-back-node 2026-11-14 20:27:46 -08:00
dotCooCoo 8767cf847f .ai save: check a split top object's sides at every point they have
The writer compared the top object's patch with the one the reader makes
of the written grid on an even 9 x 9 grid of places. A split side can
change how the reader samples a short curve that falls between those
places, so a top object could be written live although the reader would
map the contents differently there.

Coons::places gives the places in u and v where the patch's sides have
points. Each side runs straight between them, so the writer now compares
the four sides of both patches at every one of those places, within a
third of the tolerance; a point inside a patch blends its sides and
corners, so the patches then lie within the tolerance everywhere.
2026-11-14 19:55:47 -08:00
BFlat 26878d3d0e Merge pull request #7715 from dotCooCoo/fix/svg-open-path-type-before-start
Type on a path: type on an open path can start before the path
2026-11-15 10:46:42 +07:00
dotCooCoo 85acda4523 Merge main into fix/opacity-mask-art-inside-symbols-pattern-tiles 2026-11-14 19:17:05 -08:00
dotCooCoo 2a3745e63b Merge main into fix/a-colorized-warped-image-decodes-its-coverage 2026-11-14 19:16:46 -08:00
dotCooCoo 5c1aed4c48 Merge main into feat/ai-save-nested-envelope 2026-11-14 19:16:43 -08:00
dotCooCoo c7352528bf Merge main into feat/ai-save-envelope-case 2026-11-14 19:05:05 -08:00
dotCooCoo b61674f2ab .ai import: legacy PostScript .ai files open on their own artboard
A .ai in the legacy PostScript format opened with the box around all of
its art as the artboard, so art placed off the artboard came in on it.
Files opened as .eps keep their page.

- A .ai file read through its layers used the EPS rule from #1102, which
  makes the art's bounding box the artboard. It now keeps the artboard
  its header gives (%AI5_ArtSize around the center of %AI3_TemplateBox),
  with its art outside it. The engine opens a PostScript .ai or .ait
  through the new vectorcraft_eps::import_ai; an EPS's private data is
  still read as an EPS.
- A .ai of versions 3 and 4 (no %AI5_FileFormat) does not record its
  artboard's size. When it has a template box, its artboard is now
  VectorCraft's own default, a US Letter page, centered on the template
  box's center, which the version 7 specification (section 2.2) places
  at the artboard's center. Before, it was the art's box. This also
  applies to .ai files other apps write with a template box and no art
  size (#1027).
- The center of a template box with a size (a file with a template
  image) is now the middle of the box, not its lower-left corner.

A .ai with neither an art size nor a template box keeps its art's box
as the artboard.
2026-11-14 19:02:25 -08:00
dotCooCoo e328b4178e Merge main into fix/ai-cs-type-from-editing-data 2026-11-14 19:00:51 -08:00
dotCooCoo 6efa53f562 Merge main into fix/ai-off-artboard-art 2026-11-14 18:55:35 -08:00
BFlat 7c12d660af Merge pull request #7627 from dotCooCoo/feat/ai-save-graph-records
.ai save: live graphs are written as graph records
2026-11-15 09:47:28 +07:00
BFlat 8317ab745f Merge pull request #7690 from dotCooCoo/fix/ai-pen-samples-test-after-path
.ai import: pen-samples test checks a brushed path after the samples
2026-11-15 09:46:37 +07:00
dotCooCoo f14f2f9cd2 EPS: art left out at the page limit releases the images it encoded
When art passes the page limit and is taken back, the writer now drops
every image encoding made while writing it (placed images, colorized
images and freeform fields) along with the cache entries that name
them. Before, only trailing field encodings were dropped, so a placed or
colorized image, and any field encoded before it, stayed in memory for
the rest of the export.

A placed or colorized image whose first placement does not fit under
the limit is no longer encoded into the cache; it is left out with the
existing warning.

The written EPS is unchanged.
2026-11-14 18:34:19 -08:00
dotCooCoo 4887305f00 .ai import: files saved for version 11 take their type from the text document
Files saved for version 11 write the keys of their text document by name
(/DocumentResources, /FontSet, /StreamTag) and the kinds of its strikes
by their long names (/FrameStrike). The reader found no stories in them,
so their text objects were filled with the page's type in painting
order: type outside the artboards was lost, and type on them could land
in another text object.

The keys the reader uses now get their numbers from the dictionary they
sit in, from the root down, before the document is read. A run whose
style is written by name as a style's number takes that style. Files
saved for later versions that write a newer key by name among the
numbered ones (a font record's VersionString, a paragraph's
ParagraphDirection) have those keys read too.
2026-11-14 18:26:22 -08:00
dotCooCoo 0ca231a31b .ai import: the test of an older instance without a template box defines its symbol
The last case of an_instance_placed_on_the_canvas_by_an_older_file_stays_live
read an instance of a symbol the file did not define, so it failed for that
reason as well as for the missing template box. It now defines Dot, so it
fails only when the reader places an older instance without a template box.
2026-11-14 17:43:52 -08:00
dotCooCoo ba56730123 .ai editing data: opacity mask art in symbols and pattern tiles keeps live effects
Objects in an opacity mask's art inside a symbol definition or a pattern
tile are now written with their art styles, as mask art on the layers
already is. A symbol or pattern whose mask art has Offset Path opens with
the effect live in its definition, and its instances and pattern fills
draw as before. Each definition is written with the styled objects of its
own masks only, so art placed as copies inside it is not matched to
another definition's original.

- Mask art linked to a graphic style opens linked to it: the reader's
  style linking now goes into opacity masks' art.
- Links in pattern tiles count toward the lost-link warning, the warning
  is checked after unused symbols and swatch-only patterns are written,
  and links in art left out at the object limit are no longer counted as
  kept.
2026-11-14 17:34:29 -08:00
BFlat 3ca10982d5 Merge pull request #7697 from dotCooCoo/fix/ai-pen-sample-test-each-setting
.ai import: pen-sample test checks each Calligraphic setting on its own
2026-11-15 08:25:02 +07:00
dotCooCoo cb5b3e92fd Legacy .ai: a colorized warped image works out its coverage once
Each piece of a colorized image cut by a Warp effect or an envelope
decoded the image again to work out how much of the color each pixel
shows, although the decoded image was already kept for the pieces that
follow one another. The writer now keeps the coverage next to the
decoded image, for the same data and type, and works it out again only
when the image changes. The file written is unchanged.
2026-11-14 17:24:52 -08:00
dotCooCoo a3ac628576 .ai import: symbol instances in older files are read, so art outside the artboard opens
Files saved for versions 10 to 13 place each symbol instance with a
TransformMatrix. On the page it takes the symbol's art to the canvas
(y down); in a symbol's art, it takes the art to that symbol's space. The
reader only knew the RTransformMatrix of newer files, so any such
instance made the editing data unreadable, and the file opened from its
PDF part alone, which holds only the art on the artboards.

The reader now converts a TransformMatrix with the canvas point of art
space's origin that the template box gives. A file whose symbol
instances were the only part it could not read now opens from its
layers, with the art outside its artboards.

The symbols fuzz test also damages the same data in the older form.

Docs: docs/target-app-parity.md, docs/file-format-parity.md.
2026-11-14 17:03:22 -08:00
dotCooCoo 67f427b2b4 Merge main into fix/ai-pen-samples-test-after-path 2026-11-14 16:21:15 -08:00
dotCooCoo 094971e3ac Type on a path: type on an open path can start before the path
Type on an open path can now start before the path's start: its start
is stored below 0, the span runs from there, and the characters whose
middle falls before the path's start are not drawn, as SVG 2 lays out
text on a path (https://www.w3.org/TR/SVG2/text.html#TextLayoutPath).
The text keeps every character, and the start bracket stays at the
path's start. Past the path's end, text that does not fit is overflow,
as for other type on a path. Type that starts on the path draws every
glyph as before.

- SVG import keeps a <textPath> start before an open path's start
  (text-anchor end or middle, or a negative startOffset) instead of
  starting the text at the path's start, which drew every character.
- SVG export writes it as a negative startOffset.
- PDF export writes only the characters drawn on the path.
- The legacy .ai and .ai editing data writers write the type from the
  path's start with the type attributes warning.
- type.pathOptions takes a start below 0 for type on an open path; on a
  closed path it is the path's start, as before. A flip starts the type
  at its start bracket. Dragging the center bracket slides it from where
  it starts, and no further before the path.
- A click at the path's start places the caret by the first drawn
  character, and the caret in the hidden characters stands at the
  path's start. The highlight of substituted fonts and glyphs leaves
  them out.
- Release Type on a Path keeps the first drawn glyph where it was
  drawn, with the hidden characters before it.
- The Touch Type tool shows no box for a hidden character, and
  text.touchType returns an error for one. A character with a drawn
  glyph is changed by that glyph.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-14 15:44:12 -08:00
dotCooCoo bc2b5dbae6 .ai save: graph round trips leave out the art bounds the reader measures
Opening an .ai graph now sets placed_art from the art as read (main's d3789f2b0c), so the comparison in the graph round-trip tests leaves it out, as it already leaves out placed.
2026-11-14 15:37:51 -08:00
dotCooCoo dba42af495 Merge main into feat/ai-save-graph-records 2026-11-14 15:21:09 -08:00
BFlat 4cf0a4b182 Merge pull request #7474 from dotCooCoo/feat/ai-insert-aki
Type: .ai import reads Insert Aki, and .ai save writes it
2026-11-15 06:18:04 +07:00
BFlat 9f6edb7239 Merge pull request #7682 from dotCooCoo/fix/graph-outline-stroke-keeps-plot
Graphs: Outline Stroke and a graph left with only labels keep the plot in place
2026-11-15 06:17:47 +07:00
BFlat 4fffbce639 Merge pull request #7614 from dotCooCoo/fix/export-cull-brushed-path-art
PDF, EPS and print: a brushed path just off the page whose brush paints onto it is written
2026-11-15 06:17:15 +07:00
BFlat 52ec037f4a Merge pull request #7425 from dotCooCoo/fix/ai-envelope-budget-warped-type
.ai save: images with a Warp count against the envelope limit
2026-11-15 05:30:30 +07:00
dotCooCoo 31c056621d .ai import: pen-sample test checks each Calligraphic setting on its own
The test for a Calligraphic path followed by samples of the pen varied
the diameter, roundness and angle with the pen all at once. It would
still pass if the reader checked only one of the three settings, left
out Tilt, or tested the pen modes and the variations separately.

- Four new cases vary one setting with the pen and fix the other two:
  the diameter with the pressure, the diameter with the tilt, the
  roundness with the bearing and the angle with the rotation. Each
  keeps the drawn look with its note.
- A new brushed case pairs a Random setting that varies with a pen
  setting that varies by 0. The path comes in brushed.

Follow-up to #7367.
2026-11-14 14:09:25 -08:00