Commit Graph
8565 Commits
Author SHA1 Message Date
dotCooCoo 6e2a32c2a0 .ai import: legacy type used as a mask clips its clipping group
In the legacy format, `Tr` sets the rendering mode of the type that
follows. Section 5.7 of the version 7 specification says that modes 4 to
7 make the text object a mask: 4, 5 and 6 also fill, stroke, or fill and
stroke it, and 7 paints nothing. Sections 15.3.2 and 15.4.5.1 add that
these modes are used in pattern definitions, and the reader does not
read type in a pattern. The reader painted 4 to 6 like 0 to 2 and never
clipped, so the art a text mask clips showed whole.

A text object with characters in modes 4 to 7 is now a clipping path of
its clipping group (`q` ... `Q`, or the layer), as a path painted with
`W` is, and the whole object is the mask. Beside other clipping paths it
nests as they do, and the mode lasts into later text objects. Area type
with linked areas (threaded frames, also when the reader's limits keep
one frame), and type in wraparound text or in a compound path, a group
inside them included, doesn't clip, with a warning.

A `Tr` operand that is not a whole number from 0 to 9 now leaves the
mode as it was; before, 4.5 read as 4 and -4 hid the type.

The new warning and the reader's warning about linked type areas left
out get rows in every catalog.
2026-11-05 21:18:44 +07:00
BFlat cbb09c70d2 Merge pull request #5800 from dotCooCoo/feat/ai-global-name-suffix
.ai import: gradients and patterns are named up to the newline in their names
2026-11-05 21:18:35 +07:00
dotCooCoo e55c6d9d12 .ai import: gradients and patterns are named up to the newline in their names
The Adobe Illustrator File Format Specification 7.0, section 4 (p. 51),
says the name shown for a global object is the part of its name in the
file before the newline
(https://13thmonkey.org/documentation/fonts/AI7FileFormat.pdf). The
legacy reader kept the whole name, so swatches and patterns came in
named "Sky\n1". The reader now applies this rule to the files of every
version it reads.

- Gradient swatches, gradient fills, pattern definitions, pattern fills,
  palette cells and art-style pattern fills use the part before the
  newline. Lookups inside the reader still use the whole name.
- When that name is taken, the first free "Sky 2", "Sky 3" is used.
  Taken names are None and Registration, the palette's own swatch and
  group names, the default swatches when no palette replaces them,
  named colors (color operators, gradient stops, version 7 pattern
  strings, the header's and an EPS program's custom colors), the names
  of gradients and patterns that have no newline, and the names given
  to earlier gradients and patterns. Only content the reader reads
  counts: not the alternates of versioned content, the prolog, skipped
  sections or what follows the trailer.
- A name with nothing before the newline comes in as "Gradient" or
  "Pattern". Names without a newline do not change.
- docs/file-format-parity.md lists the rule.
2026-11-05 21:06:27 +07:00
BFlat b3193416b1 Merge pull request #5799 from dotCooCoo/fix/action-set-load-bounded-read
Actions: loading an action set checks its size before reading it
2026-11-05 21:04:24 +07:00
dotCooCoo 2cd68fbdcb Actions: loading an action set checks its size before reading it
Load Actions… read the whole file before checking the 8 MiB limit, so
picking a very large file could take a lot of memory before it was
refused. A new read_head service reads at most a given number of bytes;
the desktop app provides it, and loading an action set reads one byte
past 8 MiB with it. A larger file is refused without reading the rest.
Hosts without the service keep reading the whole file. Automation
roots apply to read_head as they do to read.
2026-11-05 20:55:58 +07:00
BFlat d63ce36b05 Merge pull request #5798 from devius/ka-update-2026-11-05
i18n(ka): Georgian for 1 new string
2026-11-05 20:55:50 +07:00
Davit Matchakhelidze e271e5eb18 i18n(ka): Georgian for 1 new string
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF
2026-11-05 20:47:12 +07:00
BFlat a479c8baa1 Merge pull request #5795 from dotCooCoo/fix/layers-thumbs-close-cache
Release Layers thumbnails when a document closes
2026-11-05 20:30:52 +07:00
BFlat 927ed8f236 Merge pull request #5794 from dotCooCoo/fix/image-trace-batch-options
Reject malformed Batch Trace Folder options
2026-11-05 20:30:37 +07:00
dotCooCoo d9332c806b UI-1746: Release closed document layer thumbnails 2026-11-05 20:18:52 +07:00
dotCooCoo 99169d5404 Reject malformed Batch Trace Folder options 2026-11-05 20:18:52 +07:00
BFlat d168d6d417 Merge pull request #3273 from FractalEncrypt/fix/thin-curved-stroke-coverage
Preserve raster coverage of thin curved strokes
2026-11-05 20:18:39 +07:00
BFlat f88cfdc24e Merge pull request #3272 from FractalEncrypt/fix/outline-stroke-open-fills
Keep Group Selection drags on the selected outlined component
2026-11-05 20:18:22 +07:00
FractalEncrypt e0ad7ccf16 Preserve raster coverage of thin curved strokes
Squashed from #3273 onto main.
2026-11-05 20:00:21 +07:00
FractalEncrypt 884a330fae Keep Group Selection drags on the selected outlined component
Squashed from #3272 onto main.
2026-11-05 20:00:12 +07:00
BFlat f1ee91fcd9 Merge pull request #5793 from dotCooCoo/feat/ai-tz-encodings
.ai import: a re-encoded font's own encoding pairs decode its type
2026-11-05 19:53:56 +07:00
BFlat 9f753225f0 Merge pull request #3903 from el-j/feat/copy-cut-direct-selection
M2.1: copy and cut direct-selected segments and anchors as independent paths (#2122)
2026-11-05 19:53:40 +07:00
BFlat 63909c6be6 Merge pull request #4345 from el-j/fix/offset-path-transform-ram-spike
fix(pathops): bound offset path complexity and handle arrangement failure safely (#4145)
2026-11-05 19:53:24 +07:00
dotCooCoo 7973439cc2 .ai import: a re-encoded font's own encoding pairs decode its type
In the legacy format, `TZ` makes a re-encoded font from an existing one
and can give it encoding pairs of its own, which change only that font's
encoding. Its `useDefault` operand says whether the file's `TE` encoding
also applies to the font (Adobe Illustrator File Format Specification
7.0, section 3.3.1,
https://13thmonkey.org/documentation/fonts/AI7FileFormat.pdf). The
reader skipped the body of `%AI3_BeginEncoding` sections and ignored
`TZ`, so every string was decoded with `TE`'s encoding.

Strings in a re-encoded font are now decoded with its own pairs, then
with `TE`'s encoding when `useDefault` is 1, and as Windows-1252 for the
codes left. Strings in other fonts keep `TE`'s encoding. The reader
reads `TZ` in the body of an `%AI3_BeginEncoding` section and wherever
else it appears in the script, with or without the direction operand
and the Multiple Master weight vector. The font names are the last two
names, and only numbers and the weight vector may follow them; the
reader does not use a `TZ` of another shape. The first `TZ` for a font
is used.

`TZ`'s font names also map the re-encoded font to the font it was made
from, as the `%AI3_BeginEncoding` comment does. Type in a re-encoded
font that no such comment names now opens in the font `TZ` names; when
both name the font, the first one read is used.
2026-11-05 19:40:58 +07:00
el-j 02a8928f8e M2.1: copy and cut direct-selected segments and anchors as independent paths (#2122)
Squashed from #3903 onto main.
2026-11-05 19:40:58 +07:00
el-j 08ff029ac2 fix(pathops): bound offset path complexity and handle arrangement failure safely (#4145)
Squashed from #4345 onto main.
2026-11-05 19:40:58 +07:00
BFlat c98007a43d Merge pull request #5792 from dotCooCoo/fix/ai-legacy-ts-te
.ai import: type with the older TS, Te and TM operators opens
2026-11-05 19:40:48 +07:00
dotCooCoo ab86a62ea0 .ai import: type with the older TS, Te and TM operators opens
The version 7 and version 3 file format specifications list three text
operators the editing-data reader did not dispatch, so a file whose type
used any of them on a visible layer did not open from its editing data:

- `(text) justified TS` (special characters): the reader adds its
  characters to the story, as it does for `Tx` and `Tj`.
- `Te` (end render) is read and ignored. The reader accepts it with any
  number of operands.
- `TM` (pop text matrix) is read and ignored.

Tests cover each operator in a text object, `TS` without a string and
outside a text object, and `Te` inside a tab definition. The import fuzz
tests add the operators to the legacy type tokens.
2026-11-05 19:28:59 +07:00
BFlat c547dacad6 Merge pull request #3071 from KnottyDyes/squad/raster-export-default-ppi
Export: raster output defaults to the document resolution
2026-11-05 19:14:05 +07:00
BFlat 184c591d56 Merge pull request #5791 from sadkotheguest/feat/layers-panel-nonprinting-italic
Layers panel: a layer that does not print shows its name italic
2026-11-05 19:13:48 +07:00
KnottyDyesandClaude Opus 5.5 65b8192b7e Docs: a document at another resolution exports at it, not 72 ppi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:02:23 +07:00
bflatastic 3f940efae1 Layers: the italic layer comments name Layer Options › Print 2026-11-05 19:02:23 +07:00
KnottyDyes c9588457b9 Export: raster output defaults to the document resolution 2026-11-05 19:02:23 +07:00
Alex 82251c8e8b Layers: a layer that does not print shows its name italic (#5739)
Layer Options › Print off means the layer's art does not print. The Layers panel now paints
that layer's name italic, as Illustrator shows non-printing layers, and the ghost of a row
being dragged keeps the italic. A printing layer's name stays upright, and ticking Print
again restores it.

Row names are painted rather than widgets, so the italics come from a layout job's text
format (egui slants the glyphs itself; no italic face is needed).

Tests: panels::layers::tests::a_layer_that_does_not_print_has_its_name_italic covers Print
off, Print on again, and a plain printing layer; the layers suite (64 tests) passes.
Docs: roadmap, target-app-parity and ui-parity carry the change.
2026-11-05 19:02:23 +07:00
BFlat 2030536afe Merge pull request #5790 from dotCooCoo/fix/ai-os22-g13
.ai import: 1-bit image masks open colorized by their fill color
2026-11-05 19:02:13 +07:00
dotCooCoo d5473acb09 .ai import: 1-bit image masks open colorized by their fill color
The version 7 file format specification gives `XI` and `XF` an
ImageMask operand: 0 is an opaque image, 1 is an image that is
transparent and can be colorized (sections 8.1, 8.2 and the 1-bit
examples in 8.4,
https://13thmonkey.org/documentation/fonts/AI7FileFormat.pdf). The
reader ignored the operand, so a 1-bit image mask opened as an opaque
black-and-white image.

A 1-bit gray image with ImageMask 1 now opens with the fill color set
before it as the color that colorizes it. A spot or global color keeps
its swatch and tint. When the fill is a pattern, a gradient or none,
the image is colorized black. VectorCraft's own rule is that the pixels
that open black with ImageMask 0 take the color and the others are
transparent. A linked image (`XF`) keeps the same color for when its
file is relinked. 8-bit gray, RGB and CMYK images, and images with
ImageMask 0, open as before.
2026-11-05 18:50:05 +07:00
BFlat ce31f57645 Merge pull request #5789 from dotCooCoo/fix/ai-clip-group-masks
.ai import: several clipping paths clip to their intersection
2026-11-05 18:49:56 +07:00
dotCooCoo 68f6f8755b .ai import: several clipping paths clip to their intersection
In `.ai` and EPS editing-data import, a clipping group, layer or opacity
mask's art that holds more than one clipping path (`W`) now clips to the
intersection of the paths, as each `W` intersects the current clip (AI7
spec section 5.6.2,
https://13thmonkey.org/documentation/fonts/AI7FileFormat.pdf). Before,
the paths were joined into one compound path, which clipped to their
union, and kept a stroke only when every path had the same one.

Each clipping path after the first clips a clipping group nested inside
the one before it, and keeps its own stroke, opacity and blend mode. The
innermost clipping group holds the art in the order written; as before,
every object in the group is clipped by all of its clipping paths. A
clipping path's painted fill stays at its path's level. A compound path
of clipping paths (`*u` ... `*U`) is still one clipping path. Clipping
paths that would nest the art past the document's 32 levels stop the
editing data from being read.
2026-11-05 18:37:23 +07:00
BFlat be886d3b04 Merge pull request #5773 from dotCooCoo/fix/find-font-warning-preserve-postmerge
Refresh Find Font warnings after document changes
2026-11-05 18:37:14 +07:00
dotCooCoo fdde506ec7 Refresh Find Font warnings after document changes
Squashed from #5773 onto main.
2026-11-05 18:23:06 +07:00
el-j e6ac6cd3ba perf(pathops): build Trim and Crop on each_classified_face (#4503) (#4511)
Thanks @el-j — merging.

**Summary:** Pathfinder Trim/Crop (and Merge) now build on `each_classified_face` (generalizing `each_face`) so classification and face construction share one batched pass, dropping the duplicate `batched_classified_contours` after #4375 as @bflatastic asked. Differential tests lock subpath order and the fully-covered shape case.
2026-11-05 12:22:02 +01:00
BFlat 7436b4be59 Merge pull request #5787 from sadkotheguest/fix/floating-palette-over-modal
Panels: a floating palette keeps out of the way of modal dialogs and menus
2026-11-05 18:19:33 +07:00
Alex 347b7e46bc Panels: a floating palette keeps out of the way of dialogs and menus
Floating panels are OS windows of their own, and craft-ui keeps a palette above the
app's other windows while it is active. A modal dialog or an open menu is drawn in
the main window, so a floating panel covered it: the Colour Picker's OK button and
fields, Recolor Artwork, and the menu bar's drop-downs (#5238, defect 1).

While a modal dialog or a menu of the in-window menu bar is open the docking renderer
hides each palette window, and when neither is open each palette shows again at its
palette level: topmost while the app is active, behind other applications' windows
while it is not, as craft-ui leaves a palette it creates. Hiding rather than lowering
covers both: a lowered window can be clicked back to the front, and craft-ui varies
the level through the viewport builder, which egui applies when the window opens and
not to one already on screen, so the commands go explicitly to the windows there are.

The menu bar tells the docking renderer whether one of its top-level menus is open,
the same state its hover switching uses; egui's own "any popup open" misses the
in-window menu bar.

Measured on Windows with the app focused and panels floating: before, a palette was at
the front of the z-order and topmost over the main window with the Colour Picker open;
after, the main window is in front and the palette is hidden until the dialog or menu
closes.

Tests: a_modal_lowers_the_native_palette_windows and
a_menu_of_the_menu_bar_lowers_the_palette_windows check the commands sent, and
a_palette_window_keeps_out_of_the_way_of_the_main_windows_dialog_and_menus the level
and visibility table. The wheel test
`wheel_over_a_floating_character_font_field_changes_the_font` fails on this machine
without this change too (font-order dependent), so it is not part of it.
2026-11-05 18:11:00 +07:00
BFlat f82e174fe5 Merge pull request #5786 from dotCooCoo/fix/ai-gradient-name-serial
.ai save: new gradient names continue from the last one given
2026-11-05 18:10:50 +07:00
dotCooCoo 6fef93de8f .ai save: new gradient names continue from the last one given
Each gradient definition that no swatch names took its name by trying
`Gradient`, `Gradient 2`, `Gradient 3`, ... from the start, so a document
with many such gradients tried every earlier name again for each new
one. The writer now keeps the number the next search starts from, and
still skips names that a gradient, swatch or pattern already has.

- A test names 1,000 gradients around two taken names and checks that
  each name is tried once (1,002 tries; 502,496 when each search starts
  over).
- An export test writes 300 gradients next to a `Gradient 3` swatch and
  a `Gradient 7` pattern, and checks the names in order and the same
  output when written again. It passes with the old search too.
2026-11-05 17:59:03 +07:00
BFlat 064b9b3ef8 Merge pull request #5784 from dotCooCoo/feat/ai-editing-data-s4
.ai save: the editing copy keeps images and linked files
2026-11-05 17:52:44 +07:00
dotCooCoo 653e6ff7fb .ai save: the editing copy keeps images and linked files
The editing copy of a PDF-compatible .ai wrote every image as its outline
filled with its average color. Embedded images are now written with their
pixels, and linked images as placed files with a preview:

- Embedded images are rasters in the form of the version 7 specification
  (section 8, https://13thmonkey.org/documentation/fonts/AI7FileFormat.pdf):
  %AI5_BeginRaster, the color space, the image matrix and the XI operands
  of current files, then the samples in binary in a %%BeginData section.
  Gray, RGB and CMYK images keep their samples (CMYK images their ink
  amounts), and see-through images their alpha channel after the color
  samples. The matrix is written to ten decimals.
- Linked images are placed files (section 16): the matrix, the box of the
  file's pixels and its path, %%IncludeFile, the folder relative to the
  document's (when the relative path ends in the path's file name), and a
  preview of at most 256 pixels a side.
- Images that can't be decoded or have more than 33,554,432 pixels (the
  most the reader reads) are written as their outlines filled mid gray,
  images of 16 bits a channel (CMYK TIFFs included) at 8 bits, and linked
  images in opacity masks and pattern tiles as embedded images, each with
  a warning.

Each of these is written in the form VectorCraft's .ai reader reads, and
the tests read the written data back through that reader.

The reader now gives an image its name and opacity mask when the
operators that end its raster (XH, Xr and the N after %AI5_EndRaster) come
before its dictionary, reads an empty relative folder as the document's
own folder, and looks for the %%EndData that ends an image's samples
after the alpha channel its XI operands give it, preferring one whose next
line is XH, so samples that hold the marker's bytes are read whole.

Tests: the round trip of every kind of image and its state, a second write
of what is read back giving the same bytes, the raster and placed-file
forms, previews of large linked images, and the engine's editing copy with
every save option; a fuzz case for damaged images and placed files.

Docs: docs/file-format-parity.md.
2026-11-05 17:38:55 +07:00
BFlat 88496dcefd Merge pull request #5783 from dotCooCoo/fix/ai-os22-g8
.ai import: area type with linked areas opens as threaded frames
2026-11-05 17:31:42 +07:00
BFlat 250098e19f Merge pull request #5782 from dotCooCoo/fix/stale-pointer-requests-frame-limit
MCP: given-up stale pointer requests do not use up a frame's request limit
2026-11-05 17:31:27 +07:00
BFlat 6f0e15452c Merge pull request #5781 from storytold/perf/1280-bounds-nan-close
#1280: PathData::bounds closes a NaN anchor as kurbo does; the perf row names what it times
2026-11-05 17:31:11 +07:00
dotCooCoo 48f0347351 .ai import: area type with linked areas opens as threaded frames
In the legacy format, area type whose story flows through several linked
areas has one text path (`Tp` ... `TP`) for each area, each with its own
matrix and frame (version 7 specification, sections 15 and 15.5.3). The
reader kept only the first frame, placed it with the text object's last
valid matrix, and put the whole story in that one frame.

Each linked area with a frame now opens as its own area type object,
placed with its own matrix, and the frames are threaded in file order.
The first frame holds the story: the characters after every `TP`, and
the overflow text. When the file opens, the story is laid out again
through the thread (section 15.1 lists the flow from area to area as
final-form information). A linked area without a frame is left out.
Area type with one area opens as before.

The dictionary that follows a text object (its opacity mask, text wrap,
name and other keys) went to its one object. Its opacity mask and text
wrap now go on every frame, and its other keys on the first frame.

Point type is read with its first text path's matrix, and type on a
path with the matrix and start of the first text path that has a path.
Area type with no frame at all opens as point type with its first text
path's matrix. Before, these used the last valid matrix and, for type
on a path, the last start.

One text object reads at most 4,096 text paths. The number of frames
times the story's character count is kept to 4,194,304, so a longer
story keeps fewer frames. Frames past either limit are left out, with a
warning.
2026-11-05 17:17:36 +07:00
dotCooCoo 7e97255334 MCP: given-up stale pointer requests do not use up a frame's request limit
A ui.pointer request made before synthetic input was dropped counted
toward the per-frame request limit even when its caller had already
given it up and no reply was sent. A backlog of such requests could hold
live requests back for a frame. It now counts only when the app claims
it and replies with the error, as the other given-up requests are
skipped.
2026-11-05 17:17:36 +07:00
FredAppsandClaude Opus 5.5 c1f7e4ed6d #1280: PathData::bounds closes a NaN anchor as kurbo does; the perf row names what it times
Follow-up to CodeRabbit's review of #5778.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:17:36 +07:00
BFlat b13335d188 Merge pull request #5780 from dotCooCoo/fix/font-wheel-raised-layer
Keep font wheel input with the top native panel layer
2026-11-05 17:17:22 +07:00
BFlat 8bd84206fa Merge pull request #5779 from dotCooCoo/fix/ai-os22-g7
.ai import: version 7 linked images open as linked images with a placeholder
2026-11-05 17:17:07 +07:00