346 Commits
Author SHA1 Message Date
jmvergesandClaude Opus 5.5 def928c0dc PDF import: image masks open colorized by the color they are painted in (#6313)
A PDF image mask (`/ImageMask true`) painted in a solid color opened as an
RGB image with the color in its pixels: Fill and Recolor Artwork didn't
reach the color, a spot color lost its ink, and the same mask painted again
in another color took the first one, because the painted image was cached
by the mask alone, and so did an uncolored pattern whose cell draws a mask.

It now opens as a grayscale image of what it paints, colorized by that
color, as the .ai reader opens a 1-bit image mask (#5790). A spot color
keeps its swatch and tint. The page's walk counts paths, not images, so the
ink is found from the color space. Readings of a pattern cell are told
apart by colorized images' colors too. Inside an alpha soft mask, or
painted with a pattern, a mask opens as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 14:43:13 +00:00
Don Omondi 9d23da0c41 EPS/.ai editing data: a ligature glyph named by a private-use character matches its text object
When the page's type is matched with the text objects, page words are also
split at private-use characters (from uniXXXX ligature glyph names such as
/uniE028 for a "ti" ligature) and each piece is matched as its own word, so
"Quality" set with that ligature matches its text object and the layers are
read without a false note.
2026-11-09 04:43:53 -05:00
Don Omondi f71c6aaf5b EPS import: CIDFonts only named, over a Unicode CMap, set their characters as live type
A CMap name of the public Unicode CMap form (UniJIS-UCS2-H, UniGB-UTF16-H
and similar) is understood without being defined in the file, so type in a
CIDFont the file only names decodes to its Unicode characters and is set as
live type.
2026-11-09 03:48:35 -05:00
Don Omondi dc00c31a24 EPS import: CMap mappings to base fonts' codes and glyph names draw their glyphs
bfchar and bfrange mappings are kept in the CMap and carried over by
usecmap. A code mapped to a character code draws that code in the base font
usefont named; a code mapped to a glyph name draws that glyph.
2026-11-09 03:48:35 -05:00
Don Omondi 6854529b83 EPS import: CID-keyed fonts in a FontSet's CFF data draw their glyphs
Each CID-keyed font in a FontSet's CFF data is defined as a CIDFont named by
the CFF Name INDEX, with its glyphs found by CID through the charset and
FDSelect, so a composefont over it draws its type.
2026-11-09 03:48:35 -05:00
Don Omondi eb8b8b2850 EPS import: kshow runs its procedure between the characters of live type
Between each two characters the kshow procedure runs with the two codes and
the current point after the first, in any font, not only Type 3 fonts. Where
it moves the current point the next character follows, kept as tracking.
2026-11-09 03:48:35 -05:00
Don Omondi 1b7c648da6 EPS import: embedded Type 1 fonts draw and space their type with their own glyphs
An embedded Type 1 font's eexec part is decrypted and its charstrings read,
so its glyphs and widths are used instead of the installed or fallback
font's. Codes are decoded through the font's Encoding, so fonts that place
glyphs at low codes no longer lose their type.
2026-11-09 03:48:35 -05:00
Don Omondi fde5a5fbef EPS import: CID-keyed fonts draw the glyphs of the CIDFonts the file carries
Adds composefont, the CIDInit and FontSetInit procedure sets and the CMap
operators, so EPS with CID-keyed fonts (as pdftops -level3 writes) opens.
Type 0 fonts with FMapType 9 decode their codes through the CMap's codespace
ranges and CID mappings, and the Identity CMaps are predefined.
2026-11-09 03:48:35 -05:00
Don Omondi 7a25b86a75 EPS import: Type 42 fonts take their characters and widths from the font they carry; show spacing kept as tracking
A plain Type 42 font now maps each code to its character through its glyph
names, or through the glyph its CharStrings give it in the font's own
character map or post names, instead of reading the code as Latin-1. The
font's own widths move the current point, charpath outlines its glyphs, and
the show operators' spacing and the embedded widths are kept on live type as
tracking. Type shown under nulldevice no longer appears.
2026-11-09 03:48:35 -05:00
Don Omondi 1d9833f7de Merge remote-tracking branch 'upstream/main' into fix/eps-memory-cap
# Conflicts:
#	docs/file-format-parity.md
2026-11-09 01:53:05 -05:00
BFlat 977ce06c10 Merge pull request #6018 from mockydevs/fix/eps-sampled-function-shading
EPS import: sampled functions interpolate between their samples (function shadings no longer come in as flat blocks)
2026-11-09 14:45:38 +08:00
Don Omondi 2aa23047fb Merge remote-tracking branch 'upstream/main' into fix/eps-memory-cap
# Conflicts:
#	docs/file-format-parity.md
2026-11-09 00:54:37 -05:00
BFlat fbf43fccf0 Merge pull request #5200 from dotCooCoo/fix/ai-os23-3678
.ai import: objects with a centered variable-width stroke come in as their drawn outline
2026-11-09 13:48:39 +08:00
Don Omondi a27bd53a39 Merge remote-tracking branch 'upstream/main' into fix/eps-sampled-function-shading
# Conflicts:
#	docs/file-format-parity.md
2026-11-09 00:32:17 -05:00
BFlat d90cc305fa Merge pull request #6148 from magyarb/fix/ai-right-aligned-tabs
.ai/EPS import: type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page
2026-11-09 13:18:23 +08:00
Don Omondi 086b67e93f Merge remote-tracking branch 'upstream/main' into fix/eps-sampled-function-shading 2026-11-09 00:01:46 -05:00
dotCooCoo d3d56f01ce Merge main into fix/ai-os23-3678 2026-11-08 20:58:09 -08:00
BFlat baa7248e76 Merge pull request #5158 from dotCooCoo/fix/ai-os23-2831
.ai import: names that aren't UTF-8 can be read in a legacy code page
2026-11-09 12:46:30 +08:00
M Balazs PC 68133cc731 Merge remote-tracking branch 'origin/main' into fix/ai-right-aligned-tabs
# Conflicts:
#	docs/file-format-parity.md
2026-11-09 05:45:48 +01:00
dotCooCoo 09cbf2b8f9 Merge main into fix/ai-os23-3678 2026-11-08 20:24:23 -08:00
Don Omondi 6199fcccf3 Merge remote-tracking branch 'upstream/main' into fix/eps-sampled-function-shading
# Conflicts:
#	docs/file-format-parity.md
2026-11-08 23:15:30 -05:00
M Balazs PC b64cfed610 Merge remote-tracking branch 'origin/main' into fix/ai-right-aligned-tabs
# Conflicts:
#	crates/text/src/layout/flow.rs
#	docs/file-format-parity.md
#	docs/roadmap.md
#	docs/target-app-parity.md
2026-11-09 04:48:48 +01:00
dotCooCoo 3258785476 Merge main into fix/ai-os23-2831 2026-11-08 19:44:24 -08:00
dotCooCoo 89b61de7f1 Merge main into fix/ai-os23-3678 2026-11-08 19:39:45 -08:00
dotCooCoo df100e978f Merge main into fix/ai-os23-3678
Only a Stroke Style filter's widths written as one centered array come in as the drawn look. A Stroke Offset stroke and widths written for each side stay live with their profile.
2026-11-08 19:39:44 -08:00
Don Omondi 534c44a871 Merge remote-tracking branch 'upstream/main' into fix/eps-sampled-function-shading
# Conflicts:
#	docs/file-format-parity.md
2026-11-08 22:34:40 -05:00
Don Omondi d15f7fbfba Merge remote-tracking branch 'upstream/main' into feat/ai-import-stacked-fills 2026-11-08 22:02:57 -05:00
dotCooCoo d3a323284c Merge main into fix/ai-os23-2831 2026-11-08 18:52:59 -08:00
Don Omondi 8c8d88e286 Merge remote-tracking branch 'upstream/main' into feat/ai-import-stacked-fills
# Conflicts:
#	crates/eps/src/import/ai/tests.rs
#	docs/file-format-parity.md
2026-11-08 21:08:47 -05:00
dotCooCoo 0fc62c2cf3 Merge main into feat/jxl-import 2026-11-08 18:04:51 -08:00
dotCooCoo aa74ee433c Merge main into feat/jxl-import 2026-11-08 16:52:56 -08:00
Don Omondi 499a78b0bf Merge remote-tracking branch 'upstream/main' into fix/ai-import-brushes
# Conflicts:
#	docs/file-format-parity.md
#	docs/target-app-parity.md
2026-11-08 19:21:57 -05:00
BFlat 7724463e00 Merge pull request #5991 from mockydevs/fix/eps01-editing-overlay
EPS import: gradients drawn as abutting strips come in as one gradient, without seams
2026-11-09 07:57:02 +08:00
BFlat 22f5ede66f Merge pull request #6161 from dotCooCoo/feat/ai-editing-data-s6b2
.ai save: the editing copy keeps graphic styles and links to them
2026-11-09 07:52:12 +08:00
Don Omondi abeb7e3167 Merge remote-tracking branch 'upstream/main' into fix/ai-import-brushes
# Conflicts:
#	docs/file-format-parity.md
#	docs/target-app-parity.md
2026-11-08 18:18:16 -05:00
dotCooCoo 230fbb96a3 Merge main into feat/ai-editing-data-s6b2 2026-11-08 15:00:10 -08:00
dotCooCoo b8ab981058 Merge main into feat/ai-symbol-libraries 2026-11-08 14:56:51 -08:00
Don Omondi 8383b2af6d Merge remote-tracking branch 'upstream/main' into fix/eps01-editing-overlay
# Conflicts:
#	docs/file-format-parity.md
#	docs/gaps.md
2026-11-08 17:39:34 -05:00
M Balazs PC b3fb745575 Merge remote-tracking branch 'origin/main' into fix/ai-right-aligned-tabs
# Conflicts:
#	crates/text/src/layout/flow.rs
2026-11-08 22:25:23 +01:00
dotCooCoo c4de0035b2 .ai import: the editing-copy paragraph in the file-format doc appears once again
docs/file-format-parity.md held 35 copies of the paragraph under
"Illustrator's private editing data" after #6202 left one, each copy
carrying a different set of the changes merged since. The section now
holds one copy with every clause from the others: placed PDF and .ai
pages as placed documents, Bas Relief among the single-effect art
styles, Bas Relief's settings block in type's art style, the fill a
clipping path keeps with its exceptions, paths with an Art brush, the
spot colors in brush art, symbols defined before the art styles
section, the Type on a Path options, and the artboards the type of a
PDF's later pages goes to.
2026-11-09 03:14:41 +07:00
dotCooCoo 11f1d228de Type: Align to Path moves each character by its own font's metrics
Align to Path moved the whole line by the largest ascent and descent
among its characters. Each character now moves by its own font, size
and vertical scale. Ascender runs the top of the font's em box along
the path: the ideographic em box that the font's BASE table gives, or
in a Chinese, Japanese or Korean font the one that its typographic or
hhea box, a one-em box-drawing cross or its ideographs give; else an
em box centered on the cap height. Descender runs the bottom of the font's
bounding box along the path, and Center runs a line at half the height
of the top of the font's H along it. In vertical type, Ascender and
Descender move the characters half an em, and Center leaves them on
the path.

Existing documents with Align to Path set to Ascender, Descender or
Center lay their type out at a new distance from the path.
2026-11-09 03:14:41 +07:00
M Balazs PC 933a7f35fb Merge branch 'fix/ai-type-leading-forced-breaks' into fix/ai-right-aligned-tabs
# Conflicts:
#	docs/file-format-parity.md
#	docs/roadmap.md
#	docs/target-app-parity.md
#	docs/type-parity.md
2026-11-08 20:53:19 +01:00
M Balazs PC 9f54718cc7 Merge remote-tracking branch 'origin/main' into fix/ai-type-leading-forced-breaks
# Conflicts:
#	docs/file-format-parity.md
#	docs/roadmap.md
#	docs/target-app-parity.md
#	docs/type-parity.md
2026-11-08 20:52:09 +01:00
Don Omondi 3bb43b2fe6 EPS import: composite fonts draw their Type 42 descendants' glyphs
A composite (Type 0) font with the 8/8 mapping picks a descendant font
and a code in it with each pair of bytes (PLRM 3rd ed., 5.10). The reader
set its strings as type in a font of the composite font's name, the
bytes read as Latin-1 and at a thousand times the size, so EPS from
pdftops of a PDF with embedded TrueType fonts showed nothing, or one
black shape, where its type was.

Characters now go to their descendants: a Type 42 font's glyphs are drawn
from the TrueType outlines its sfnts strings carry (Adobe Technical Note
5012), by the glyph index CharStrings gives their names, spaced by their
own widths or the show operator's numbers; charpath and stringwidth read
them too. A Type 3 descendant runs its procedures, and a descendant found
by name sets its character as type at the composite font's size.
2026-11-09 02:24:54 +07:00
M Balazs PC 500ff6ed4c .ai import: opacity mask art without its own paint takes the paint before its dictionary
A dictionary's state starts afresh, with a black fill. Mask art is written
going on from the paint before the mask's dictionary, which the writer leaves
out when it doesn't change, so a mask rectangle with no colour of its own
came in black and hid the white letters it masks. Mask art now starts from
the paint (fill, stroke, line style, fill rule, overprint) before the
dictionaries it is in; lock, visibility and transparency still start afresh.
2026-11-09 02:03:02 +07:00
Don Omondi d4f6fa0744 EPS/.ai editing data: art-style strokes aligned inside or outside keep their alignment
Squashed from #6010 onto main.
2026-11-09 02:03:01 +07:00
M Balazs PC 97ac14ca7d Merge branch 'fix/ai-type-leading-forced-breaks' into fix/ai-right-aligned-tabs
# Conflicts:
#	docs/roadmap.md
#	docs/target-app-parity.md
2026-11-08 19:34:58 +01:00
M Balazs PC 7f17207d67 Merge remote-tracking branch 'origin/main' into fix/ai-type-leading-forced-breaks
# Conflicts:
#	docs/roadmap.md
#	docs/target-app-parity.md
2026-11-08 19:33:41 +01:00
dotCooCoo fb848d28ac .ai import: objects in pattern and brush art take the file's art styles
A pattern's definition (in either form) and a brush's art were read
without the file's art styles, so an object there with a style came in
as the look it draws, with a "drawn look" note, while the same object on
a layer or in a symbol came in as itself with its effects live. The
three definition readers now take the art styles as the symbol reader
does, and an object in a pattern's art with a style in the file's style
list keeps that graphic style's id.

An art styles section inside a symbol's, a pattern's or a brush's art
is now skipped, so it no longer replaces the file's own art styles.
2026-11-09 00:36:09 +07:00
dotCooCoo 7b06cc070b .ai save: the editing copy keeps Standard Vertical Roman Alignment
The editing-data writer wrote a run's key 35 only for Tate-chu-yoko (3).
Type with Standard Vertical Roman Alignment, on or off, was saved with no
key, so the setting was lost from the editing data. Every run now carries
key 35 in the form the reader reads it (crates/eps/src/import/ate.rs,
Texts::style, lines 669-670): 1 when the setting is on, 2 when it is off
and 3 for Tate-chu-yoko. The document's defaults and the normal character
style carry 1.

Key 35 holds one value, so a run with both Tate-chu-yoko and the setting
is written as Tate-chu-yoko, and the save reports the type attributes
warning for it.

- writer/texts.rs: baseline_direction() gives each run's value;
  normal_char() writes 1; loses() and TYPE_ATTRIBUTES name the setting.
- tests.rs: a vertical and a horizontal object with the setting on, off
  and Tate-chu-yoko come back the same through the reader, lay out as
  before, and carry the expected keys; a run with both is reported.
- docs/file-format-parity.md: the .ai save section lists the written
  values.
2026-11-09 00:35:51 +07:00