7251 Commits
Author SHA1 Message Date
Brandon Thomas b676c626e0 Merge pull request #5186 from dotCooCoo/fix/legacy-ai-character-rotation
Legacy .ai: type with rotated characters is written as outlines that keep the rotation
2026-11-01 23:45:34 -05:00
Brandon Thomas 9d2d633bc3 Merge pull request #5184 from dotCooCoo/fix/eps-spot-reserved-colorant-names
EPS: spot inks named All or None print as spot inks
2026-11-01 23:45:30 -05:00
Brandon Thomas d3ef9a6aae Merge pull request #5183 from dotCooCoo/fix/replace-symbol-clears-overrides
Symbols: Replace Symbol clears the old symbol's dynamic overrides
2026-11-01 23:45:26 -05:00
Brandon Thomas 01d371b744 Merge pull request #5182 from dotCooCoo/fix/pdf-spot-gradient-white-process-stop
PDF export: a white stop linked to a process swatch keeps a spot gradient on its ink
2026-11-01 23:45:21 -05:00
Brandon Thomas ff3b00e832 Merge pull request #5178 from dotCooCoo/fix/issue-3437
Fix #3437: Spiral segments follow the spiral
2026-11-01 23:45:17 -05:00
Brandon Thomas af7fb8c43f Merge pull request #5171 from dotCooCoo/fix/issue-2089
Fix #2089: Affinity strokes keep their Width tool profile
2026-11-01 23:45:14 -05:00
Brandon Thomas d58114bea8 Merge pull request #5164 from dotCooCoo/fix/issue-3818
Fix #3818: the chosen brightness holds when the system theme differs
2026-11-01 23:45:09 -05:00
.CooCoo 890c27ccb2 Native format: take the .vectorcraft envelope from craft-vectorcraft-format (#5146)
* Native format: the .vectorcraft envelope comes from craft-vectorcraft-format

vectorcraft-format reads and writes the file's envelope through the
craft-vectorcraft-format crate in craft-libs: Head and Image, the version
and size constants, the format and version check, Tail for the data after
the JSON, split_tail and entry, and base64. The constants, is_compressed,
json_part, base64_encode and base64_decode are re-exported from
vectorcraft_format, so callers do not change. load_file reads the members
it uses with Image entries and skips the preview and PDF data. The
document, its migrations, the version 1 writer, gzip writing, sniff and
the limits on decompression stay here.

A preview or pdf member of the wrong shape now reads as missing on its
own, so pdf_content still returns a file's PDF when its preview is
damaged.

A new test saves a document in every version, compressed and pretty,
with a preview, profiles and a PDF, reads it back, saves it again and
compares the bytes; it also reads each uncompressed file as the crate's
File. Another reads the PDF of a file whose preview is damaged.

* Native format: sniff from craft-vectorcraft-format, pinned at #408's head

- craft-vectorcraft-format moves to craft-libs 0fd7e75fe6, the head of
  storytold/craft-libs#408.
- `sniff` is the crate's: a file is native when its top-level `format`
  member, within the first 256 bytes after decompression, is
  `vectorcraft` or `drawcraft`, read with JSON escapes decoded. The word
  elsewhere in the head no longer counts. All 192 corpus files and
  their resaved copies get the same answer as before.
- Envelope errors other than the format and the version keep the
  crate's message instead of reading as a compressed file that unpacks
  to too much.
- A test checks that a repeated `generator`, `preview` or `pdf` opens
  and any other repeated member is refused, by `load_file` and by the
  crate's `Contents` alike.

* Native format: read through the crate's Contents and Entries

Pins craft-vectorcraft-format at 420a27f18f, the current head of
craft-libs#408, and replaces VectorCraft's own copies with the crate's:

- load_file reads the JSON through Contents::read, which also refuses
  another format or a newer version. Opened is removed. Messages are
  those of main: serde names the struct File, as main's reader did.
- In-memory data after the JSON (uncompressed files, and compressed
  files unpacked whole) is read through the crate's Entries.
  entries_within keeps its streaming reader for compressed files, whose
  data is unpacked entry by entry and is never one slice in memory.
- The streaming reader finds the marker through the crate's marker_at.
- MAX_BLOB is the crate's MAX_ENTRY (1 GiB).

save_to still writes the envelope member by member: it streams the
document into the output and looks for the images it uses as it
writes, and File would need the images before the document. A new test
checks that its output, compact, pretty and compressed, for versions 1
to 4, equals serde_json::to_vec or to_vec_pretty of the crate's File
holding the same members followed by the crate's Tail, so a change to
either side fails.

* Native format: pin craft-vectorcraft-format at craft-libs main

craft-libs#408 merged as 14d5dbb50c; the crate is unchanged from
420a27f18f. A test checks that the crate's sniff takes every layout
VectorCraft has written: the version 1 and 2 files from before the
rename, compact and pretty, and each version save_with writes.
2026-11-01 23:30:54 -05:00
Brandon ThomasandClaude Opus 5.5 bce3de36ca Legacy .ai: docs say when the rotated-type warning shows, and record the change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 23:27:52 -05:00
dotCooCoo 1186d1f712 Affinity: pressure curves that can't be read count against the document's limit
A curve rejected for having more than 256 segments now counts the most points a curve may have against the document's pressure points, so linking it from many strokes reads it a bounded number of times. Once the points are used up, later strokes import as plain strokes with a warning.
2026-11-01 18:09:53 -08:00
dotCooCoo 880a078053 Legacy .ai: type with rotated characters is written as outlines that keep the rotation
A version 7 text object has no arbitrary-angle character rotation: its
character attributes include baseline shift (Ts), scaling (Tz) and
tracking (Tt), Tv only turns Roman characters 90 degrees in vertical
text, and the positioning operators such as Tm are ignored on reading.
Type with Character Rotation was written as editable text with the
rotation left out, so rotated characters opened upright.

Such type is now written as its glyphs' outlines, the way type 8-bit text
can't hold already is, with the warning "type with rotated characters is
written as outlines, which keep the rotation, and is no longer editable
text". The outlines keep each character's rotation, baseline shift and
scale. Type without rotated characters, and type turned a whole number of
times, is still written as text.

Docs: docs/file-format-parity.md, docs/mcp.md, docs/target-app-parity.md.
2026-11-01 16:35:49 -08:00
dotCooCoo 7984606471 EPS: spot inks named All or None print as spot inks
A Separation space whose colorant is named All paints every plate, and
one named None paints nothing (ISO 32000-1:2008, 8.6.6.4). EPS export
wrote a spot swatch's name as its colorant, so a spot color named All
printed on every plate and one named None did not print.

Such an ink is now written as All Spot or None Spot, numbered All Spot 2
and on when a spot swatch already has that name, in its Separation
space, DeviceN spaces and the %%DocumentCustomColors and
%%CMYKCustomColor comments. At PostScript Level 3, a gradient that mixes
one of these inks with another spot ink or with process or gray stops is
now a DeviceN shading instead of process colors. Registration still
writes All.
2026-11-01 16:32:41 -08:00
dotCooCoo 589c56da22 PDF export: a white stop linked to a process swatch keeps a spot gradient on its ink
A gradient of one spot ink's tints and paper white is written as a
Separation shading in that ink, with each white stop at 0% of it. A
white stop linked to a swatch that is not a spot color (a global White
swatch, for example) did not count as paper white. In an RGB document
the spot ink was then dropped: a Classic gradient was written in the
stops' own colors, and a Perceptual one was exported as an image in
process colors.

Such a stop now counts as paper white in the Separation and DeviceN
paths and in the checks that pick them, as an unlinked white stop does.
A stop linked to a white spot color is still a stop of that ink.
2026-11-01 16:28:40 -08:00
dotCooCoo 2adf5a9a61 Symbols: Replace Symbol clears the old symbol's dynamic overrides
An override on a dynamic symbol instance names an object of its symbol's
art by path. Replace Symbol kept every override whose path the new
symbol's art also had, so a change made to one object of the old symbol
was applied to an unrelated object of the new one. An instance given a
different symbol now drops its overrides; an instance replaced with its
own symbol keeps them. Undo brings them back.
2026-11-01 16:24:33 -08:00
dotCooCoo e441d3ba18 Affinity: pressure curves keep dips between samples and stay within a document-wide limit
- Each segment of a pressure curve is also sampled where its width stops
  rising or falling, so a dip between the regular samples of a long
  curve is kept. The segment's values are scaled into -1..1 before that
  is solved, so huge values in a file can't overflow it.
- A curve counts as full width only within 1e-9 of it, so a curve just
  under full width keeps its profile.
- The pressure points of all strokes in one read are limited to about a
  million, as for characters and table cells. Curves at full width count
  too, and once the limit is reached no more curves are read; the
  strokes past it are imported as plain strokes with a warning.
2026-11-01 16:21:57 -08:00
dotCooCoo 0067aee519 Tests: the tool tip's box keeps the theme's fill and contrast
The test for #3818 checked the tool tip's text color and the style's
window fill. It now also checks the fill of the box drawn behind the tool
tip's text, and that the text and the box have a contrast ratio of at
least 4.5, for every brightness and scheme.
2026-11-01 14:45:35 -08:00
dotCooCoo d5004b7dae Fix #3437: Spiral segments follow the spiral
The Spiral tool places its anchors on a logarithmic spiral, with the
radius shrinking by the decay each quarter turn, but gave every handle
the direction of a circle's tangent and a length from an averaged
radius. The curve bulged off the spiral between anchors and turned at
each anchor, so the spiral looked squared: up to 2.8% off its radius at
the default 80% decay and 23% at 30%.

The handles now follow the spiral's own tangent, with lengths that
differ at each segment's outer and inner end. The curve stays within
0.03% of the spiral at 80% decay and 0.8% at 20%. Anchor positions and
counts are unchanged.
2026-11-01 14:42:42 -08:00
dotCooCoo b473716e3e Fix #2089: Affinity strokes keep their Width tool profile
An Affinity stroke shaped with the Width tool stores its pressure curve
(LDeP: position along the path against width). The importer warned and
drew the stroke at full width all along.

- The pressure curve is read and sampled into the stroke's width
  profile (2 to 8 points per segment, 256 segments at most, widths up
  to the full weight). A curve at full width all along stays a plain
  stroke; one that can't be read is warned about.
- Brush strokes keep their own warning.
- The pinned Affinity 3 signatures for the five corpus files with such
  strokes are updated.
2026-11-01 14:17:23 -08:00
dotCooCoo a055ebcbc7 Fix #3818: the chosen brightness holds when the system theme differs
The theme's colors went into egui's style for the current system theme
only. When the system's light or dark setting differed from it or
changed while the app ran, egui switched to its other style, which held
egui's defaults: tool tips became a white box with gray text, or with
the theme's light text. Applying a brightness now sets egui's theme to
match, starting from the current style so settings such as the tool tip
delay carry over.
2026-11-01 13:30:34 -08:00
Brandon Thomas 639c9d6ce9 Merge pull request #5113 from dotCooCoo/feat/recolor-color-sliders
Recolor Artwork: color sliders in a chosen color mode edit the selected row's new color
2026-11-01 15:28:03 -05: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
Brandon Thomas 33010204cb Merge pull request #5137 from dotCooCoo/fix/vars-p16
Variables: Lock Variables' description names the refused import
2026-11-01 15:27:53 -05:00
Brandon Thomas 2aa24c1f3a Merge pull request #5136 from dotCooCoo/fix/vars-p5
Variables: a graph variable's data set applies its CSV as graph.setData does
2026-11-01 15:27:48 -05:00
Brandon Thomas 7e5eebc3ed Merge pull request #5135 from dotCooCoo/fix/vars-p15
Variables: Rename reports a missing variable or data set before a taken name
2026-11-01 15:27:45 -05:00
Brandon Thomas 0271e034ce Merge pull request #5123 from dotCooCoo/fix/ai-os22-g6
.ai import: version 7 palettes keep their swatches without names
2026-11-01 15:27:41 -05:00