Commit Graph
529 Commits
Author SHA1 Message Date
BFlat 1ac6d68a7e Merge pull request #7968 from dotCooCoo/fix/graph-stacked-column-legend-stroke
Graphs: legend swatches have their series' stroke, so stacked column and area graphs save to .ai as graphs
2026-11-16 08:11:37 +07:00
dotCooCoo ec9c558456 .ai save: area type wrapped by plain paths, compound paths or groups stays type
Area type with wrap shapes was always written as outlines in the editing
data for other apps. It is now written as type when the reader works the
same wrap out again from the objects above it: each wrap object is a path
of one subpath, a compound path of visible members, or an unclipped group
of such objects, with no paint, or a solid fill, a plain solid stroke or
both, without effects, art style, opacity mask or clipping, with an
offset within -1000 to 1000 pt; the type's stored shapes match the ones
those objects give it; and the shapes of all area type stay within the
2,000,000 anchors the reader copies. Each frame of a thread is checked on
its own. When art is left out at the object limit, such type is written
as outlines again. Other wrapped area type stays outlines.

The reader recomputes the wrap with resolve_wrap after reading
(resolve_text_wrap in crates/eps/src/import/native/build.rs) and reads the
options with text_wrap in crates/eps/src/import/ai/read/document.rs; the
round-trip tests check the reopened characters, frame, wrap shapes and
wrap objects. resolve_wrap's layer walk is shared through a new
wrap_sources so the check follows the same traversal.
2026-11-15 12:56:22 -08:00
dotCooCoo 92b3b10e7b Graphs: legend swatches have the stroke of their series' marks
A default legend swatch of a stacked column, stacked bar, area or pie
series now has the thin white stroke the series' marks have, beside the
plot or across the top. Before, the swatch had no stroke, so the series
group painted with two strokes and a drawn stacked column or area graph
was saved to .ai as plain art with a warning. Both now open again as live
graphs. Stacked bar graphs are still written as art: the .ai reader has
no type for them.
2026-11-15 12:27:19 -08:00
BFlat 3239725c40 Merge pull request #7817 from dotCooCoo/feat/psd-import-options-import-slices-after-7649
PSD: Import Slices brings a file's slices in as user slices on Open and Place
2026-11-15 20:45:50 +07:00
BFlat 6ec6114d24 Merge pull request #7751 from Hassan1305/fix-7741-pdf-text-stroke-cap
PDF import: stroked type keeps its cap, join and miter limit (#7741)
2026-11-15 16:39:02 +07:00
dotCooCoo d842aa816c Merge main into feat/psd-import-options-import-slices-after-7649 2026-11-15 00:50:14 -08:00
HassanKhan 75c884e333 Merge remote-tracking branch 'upstream/main' into fix-7741-pdf-text-stroke-cap
# Conflicts:
#	docs/roadmap.md
#	docs/target-app-parity.md
2026-11-15 12:33:21 +05:00
dotCooCoo b64ee486f9 Merge main into fix/opacity-mask-art-inside-symbols-pattern-tiles 2026-11-14 22:26:08 -08:00
dotCooCoo d0b69af348 Merge main into feat/psd-import-options-import-slices-after-7649 2026-11-14 22:06:58 -08:00
HassanKhan 9dafc08f8f PDF import: a glyph stroked otherwise gets a run of its own (#7741)
A filled glyph joins a run of the same fill whatever its stroke, so with
fill and stroke rendering shown a glyph at a time, the stroke replayed
over the last glyph restyled the whole run: glyphs before it took its
cap, join and miter limit. When that stroke differs from the run's, the
glyph's text now splits off into a run of its own; the line's text is
unchanged, so slots, gaps and authored flags still line up.

Also record the change in the parity and roadmap docs.
2026-11-15 11:05:54 +05:00
HassanKhan 1301192aeb PDF import: stroked type keeps its cap, join and miter limit (#7741)
Glyph strokes reached the type's character style as paint and width only,
so stroked PDF text (rendering modes 1, 2, 5, 6, and under ActualText)
came in with butt caps, miter joins and a miter limit of 10. The text
path now carries the graphics state's line cap, line join and miter
limit, taken as paths take them, and glyphs stroked with other ones start
a run of their own.
2026-11-15 10:10:41 +05:00
dotCooCoo 599e1705ce PSD: Import Slices brings a file's slices in as user slices on Open and Place
Read image resource 1050 (version 6 records and the version 7 and 8
descriptor) and turn each slice the file did not generate automatically
into a user slice with its name, type, link, target, message, alternative
text, cell text and background color.

- document.open takes importSlices (default true) with either layer
  choice; file.place takes it (default true embedded, false linked; true
  with link is an error) and moves and scales the slices with the placed
  art in the same undo step. file.place.info, file.place.queue and
  document.psdInfo report or pass it.
- PSD Import Options gains Import Slices, enabled for a file with slices,
  independent of the conversion choice, and remembered with the other
  choices; a file with slices asks even with fewer than two layers.
- Slices outside the canvas, and slice data that can't be read, are left
  out with a warning while the art comes in. Counts, nesting and text
  lengths read from the file are capped.
2026-11-14 20:36:31 -08:00
dotCooCoo fb616f2c76 Merge main into feat/psd-import-options-import-slices-after-7649 2026-11-14 19:42:05 -08:00
dotCooCoo 85acda4523 Merge main into fix/opacity-mask-art-inside-symbols-pattern-tiles 2026-11-14 19:17:05 -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 237fe27e50 Merge pull request #7713 from dotCooCoo/feat/psd-clipping-path
PSD: a file's clipping path clips its merged image on Open and Place
2026-11-15 09:46:45 +07: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
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 06fbf967a9 Merge feat/psd-import-options into feat/psd-import-options-import-slices-after-7649 2026-11-14 16:23:42 -08:00
dotCooCoo d0f1346f87 Docs: record the PSD clipping path in the PSB row and the evidence list
The PSB row of docs/file-format-parity.md says the merged image comes in
clipped by the file's clipping path, as the PSD row does, and
docs/target-app-parity.md's evidence list gets a line for it.
2026-11-14 16:20:16 -08:00
dotCooCoo af010b6dec PSD: a file's clipping path clips its merged image on Open and Place
A PSD or PSB file can name one of its saved paths (image resources 2000
to 2997) as its clipping path in resource 2999. psdread::clipping_path
reads that path in the image's pixel space, under the even-odd rule the
file format specification gives, with a subpath around the whole image
first when the initial fill record says the fill starts with all
pixels.

File > Place of such a file, and File > Open of its merged image, put
the image in a clip group of that path with no paint. file.place answers
the image's id as `image`, as for a DCS file. Replacing an image alone
in a clip group with such a file keeps the image's scale and rotation.
links.update and links.relink leave the clip group as it is. Files that
name no clipping path come in as before.
2026-11-14 15:55:34 -08:00
dotCooCoo dba42af495 Merge main into feat/ai-save-graph-records 2026-11-14 15:21:09 -08:00
dotCooCoo b10ace75b6 Merge main into feat/psd-import-options 2026-11-14 13:45:30 -08:00
dotCooCoo 6a5110a40c Merge main into feat/ai-save-graph-records 2026-11-14 13:27:39 -08:00
dotCooCoo 6068c42ce6 Merge main into feat/open-pdf-pages-as-links 2026-11-14 12:23:47 -08:00
BFlat c6c06b2c68 Merge pull request #7442 from dotCooCoo/fix/eps-ryumin-light-h
EPS import: Ryumin-Light-H and GothicBBB-Medium-V read as Japanese type without their CIDFont
2026-11-15 03:19:37 +07:00
dotCooCoo dab13fbf14 Import PDF: Import PDF pages as links opens each page linked to its file
File › Open's Import PDF dialog gets Import PDF pages as links. With it on,
each page picked opens as a placed document linked to that page of the
file, on an artboard of its Crop To box and a layer named after the page,
in place of editable art. The Links panel lists each page, and Embed makes
a page editable.

document.open takes the matching linkPages param. It is refused for a
file that is not a PDF or a PDF-compatible .ai, for bytes without a path,
with a password and with textAs: outlines. The pages share one copy of
the file, and the document opens in CMYK when most of its pages do.
Save asks for a name, as for other partly read PDFs.
2026-11-14 12:13:59 -08:00
dotCooCoo 4d3a21eca7 PSD: Open and Place without Link ask how a layered file's layers come in
File > Open of a PSD or PSB file with two or more layers now shows PSD
Import Options: Convert Layers to Objects (with Import Hidden Layers) or
Flatten Layers to a Single Image. File > Place shows the same dialog for
such a file placed without Link, and so does a file dropped on the canvas
with Shift held. Several files placed together without Link take the
choices made last. A file placed with Link keeps its flat image.

file.place takes layers and hiddenLayers: with layers: true the layers
come in as one group named after the file, a layer as an image and a
layer group as a group, at the place the merged image would take and
clipped to the canvas when layers reach past it. link: true with layers
is an error, and so is hiddenLayers without layers. file.place.queue and
file.place.info pass both on. document.psdInfo counts a file's layers
from its layer records without decoding pixels.

Docs: the params text, docs/mcp.md, docs/file-format-parity.md and
docs/target-app-parity.md.
2026-11-14 10:45:30 -08:00
dotCooCoo 506f48daea .ai save: live graphs are written as graph records
Both .ai writers now write a graph that the .ai reader reads back as the
same graph with its records, so a saved graph opens again live, with its
table, type, axes and settings: %_Gs, the Gb, Gy, Gd, Ga/GA, Gz, Gc and
GC records, the graph's group with each series' group followed by a Go
tag, and %_GS (the published .ai file format specification, section 17
and appendix A). The records are the ones the reader in
crates/eps/src/import/ai/read/graph.rs (#7311) reads, in the form it
reads them.

The shared encoder in crates/eps/src/ai_graph.rs decides first whether
the reader keeps the graph whole: a column, stacked column, line or area
graph with a legend, settings the records carry, a table of 1 to 10,000
categories and 1 to 256 series with finite values, labels of at most 255
bytes without control characters, and art the reader attaches the graph
to. Any other graph is written as its art, with the existing warning, as
is a graph whose art the editing writer's object limit cuts short.
Tick-mark counts of 0 are written as 1, the count the reader keeps for
both.

Bar, stacked bar, scatter, pie and radar graphs, stacked column and area
graphs whose series marks carry a stroke their legend swatch lacks, and
line graphs with markers are still written as their art, with the
warning.
2026-11-14 08:20:05 -08:00
BFlat d31457281a Merge pull request #7436 from dotCooCoo/fix/svg-masked-shadow
SVG export: shadows in a masked group show in readers that bound it by its shapes
2026-11-14 21:48:10 +07:00
dotCooCoo 14076169fc Merge main into fix/svg-masked-shadow 2026-11-14 03:21:12 -08:00
dotCooCoo 0397bfa47f Merge main into fix/ai-calligraphic-samples 2026-11-14 02:53:05 -08:00
dotCooCoo 4678bda849 Merge main into fix/eps-ryumin-light-h 2026-11-14 02:18:10 -08:00
BFlat 111ceddb9b Merge pull request #7383 from dotCooCoo/feat/ai-art-brush-options
.ai import and save: Art brushes keep None, their width, scale and flips
2026-11-14 16:54:16 +07:00
dotCooCoo 3c4170fa25 Merge main into fix/svg-masked-shadow 2026-11-13 23:05:34 -08:00
dotCooCoo 66535b725b Merge main into fix/eps-ryumin-light-h 2026-11-13 23:05:31 -08:00
BFlat ab959b95a8 Merge pull request #7369 from dotCooCoo/fix/ai-hidden-ruler-guide
.ai import: hidden ruler guides open as ruler guides with their own state
2026-11-14 13:43:11 +07:00
dotCooCoo edee68e3d1 EPS import: Ryumin-Light-H and GothicBBB-Medium-V read as Japanese type without their CIDFont
A name ending in the row-and-cell CMap H or V split only when the file
defined the CIDFont or a face of that name was installed, so
/Ryumin-Light-H findfont in a file that only names it read its strings
byte by byte as a plain font: <467c> came in as "F|" instead of 日.
Ryumin-Light and GothicBBB-Medium, the Japanese CIDFonts a printer
carries (Adobe Technical Note #5014, appendix A.2), now split at H or V
as well. Latin names such as Foo-Bold-H still stay whole.
2026-11-13 20:48:18 -08:00
dotCooCoo 1fbbb0a4e7 SVG export: shadows in a masked group show in readers that bound it by its shapes
Some SVG readers draw a masked group only inside the bounding box of its
shapes. A drop shadow, glow, blur or feather inside the group paints past
those shapes, so these readers left it out, while others drew it.

A masked group now starts with a rectangle over the mask's region,
unpainted (fill="none") and hidden (visibility="hidden"), when what it
holds has a visible raster effect: on a member at any depth, on a fill or
stroke, in a symbol's art, or in the art a blend or other live object is
written as. The rectangle widens the group's bounding box without drawing
anything, and import leaves it out. The masked groups of a knockout group
get the same rectangle when an element inside them has such an effect.
Other masked art, brushed strokes included, is written as before, and so
is an object whose own effects are written outside its mask.

Tests: a_masked_group_spans_its_region_when_its_art_paints_past_its_shapes
and a_knockout_group_spans_its_masks_when_an_element_paints_past_its_shapes
in crates/svg/tests/it/blend_export.rs.
2026-11-13 20:23:15 -08:00
dotCooCoo e9ae8b9661 Merge main into fix/ai-calligraphic-samples 2026-11-13 19:50:31 -08:00
dotCooCoo 49a3c3d718 Merge main into feat/ai-art-brush-options 2026-11-13 19:09:26 -08:00
BFlat ea24f694cf Merge pull request #7345 from dotCooCoo/fix/ai-twist-straight-guide-reach
.ai import: straight compound paths whose guides reach past them keep the drawn look under Twist
2026-11-14 09:32:51 +07:00
dotCooCoo 719e3450b2 .ai import and save: Art brushes keep None, their width, scale and flips
A .ai path with an Art brush opened with the brush on its stroke only
when the brush stretched its art at 100% in Tints, unflipped. Paths with
an Art brush in None, at another fixed width, with Stretch Between
Guides, or flipped along or across now open as the path with the brush
on its stroke too, and the brush in the Brushes panel has those options.
The guides come in as fractions of the art, from the lengths of the art
outside them. A brush with Scale Proportionately comes into the panel
with that option, and its paths keep their drawn look.

Paths keep their drawn look when their settings that change the drawing
differ from the brush's, and when the brush is in Tints and Shades or
Hue Shift, has a width that follows the pen, has guides that leave no
art between them, or has a Spacing, Adjustment or FoldAdjustment other
than 0, 1 and 1.

The .ai save writes the same options, so such brushes and the paths
that use them come back as they were; a path with a proportional brush
is written as its brush's art.
2026-11-13 18:27:54 -08:00
dotCooCoo 7b475b46b0 .ai import: Calligraphic paths with pen samples keep their drawn look
A path's own lines can be followed by samples of the pen
(`(…) Xt n XD`). The reader took them as the end of the object, so the
style marker after them was not matched: the path came in as its drawn
look plus a second, unpainted copy of the path, and no note said the
look was kept. The samples now stay with the path. They aren't read,
so a path that has them keeps its drawn look alone, with the note, when
a setting of its Calligraphic brush varies with the pen (Pressure,
Tilt, Bearing or Rotation, with a variation above 0). With any other
style, an Art brush or a Calligraphic brush that doesn't follow the
pen included, it takes the style as it would without them.

A Calligraphic brush's filter with an entry the reader doesn't know, or
with a variable width, keeps the drawn look too, as an Art brush's
filter does.

Docs: docs/file-format-parity.md, docs/gaps.md.
2026-11-13 17:59:50 -08:00
dotCooCoo 1e4b6c4e22 Merge main into fix/ai-hidden-ruler-guide 2026-11-13 17:56:13 -08:00
dotCooCoo cfa76d674f .ai import: hidden ruler guides open as ruler guides with their own state
A straight `(N) *` guide path that runs across the canvas or an artboard
opens as a ruler guide, but a hidden one (`1 Xw`) stayed a guide path.
It now opens as a ruler guide too, and every ruler guide made from such a
path keeps the path's hide, lock and name, so its Layers row shows them.
Before, a locked guide opened unlocked and a named one lost its name.

Hidden or locked guide paths that are short, slanted, grouped or `(S) *`
stay guide paths, and commented copies (`%_`) are still left out.

Docs: docs/target-app-parity.md, docs/file-format-parity.md.
2026-11-13 17:55:31 -08:00
BFlat bf3cf422e2 Merge pull request #7311 from dotCooCoo/fix/ai-graphs-keep-data
PDF/.ai import: graphs keep their data and settings when their records read whole
2026-11-14 08:39:57 +07:00
dotCooCoo be8d614b0c .ai import: straight compound paths whose guides reach past them keep the drawn look under Twist
A straight compound path with Twist was read live up to 180° whatever
guides it held, and the live Twist was measured from bounds that take in
the guide members. A straight compound path with Twist whose guide
members reach past its other members now opens as its drawn look
instead of live, and so does a compound path made only of guides.
Compound paths whose guides lie inside their other members, a Twist of
0°, and single paths keep opening live.

The `.ai` writer keeps a graphic-style link only where the reader reads
the style live, so such an object is now written without the link, with
the existing style-link warning.
2026-11-13 16:35:37 -08:00
BFlat f14aa09bbf Merge pull request #7226 from dotCooCoo/fix/legacy-ai-type-kerning
PDF/.ai import: legacy type keeps manual kerning, discretionary hyphens and language
2026-11-14 07:34:10 +07:00