Commit Graph
595 Commits
Author SHA1 Message Date
BFlat 53e0969826 Merge pull request #6724 from jmverges/fix/6644-envelope-type-strokes
Envelopes: type's strokes paint at their own weight along the bent outlines
2026-11-12 09:11:09 +07:00
BFlat d1a9c5a49c Merge pull request #6728 from dotCooCoo/feat/conic-gradient
Gradients: conic gradients sweep the stops once around the center
2026-11-12 09:09:08 +07:00
dotCooCoo d262c65b14 .ai/EPS import: gradient mesh corners in several inks take their tints last ink first
Under an `/NChannel` color space a mesh corner gives one tint for each
ink. The reader now pairs the tints with the inks in the opposite order
to the listing, for process and spot inks alike: under
`[[Yellow] [Magenta] [Cyan] 3 /NChannel]`, `0 0 1` is full yellow. No
public document describes these records. This is VectorCraft's reading
of them, and under it the meshes match the flattened page that the same
file carries.

The reader gave the first tint to the first ink listed, so mesh areas
came in with the wrong inks, yellow as cyan. Where enough of the art
changed, the layers no longer matched the file's page, and the file
opened as its page instead of its objects.
2026-11-11 16:24:48 -08:00
dotCooCooandGert Pellin 1b744eae52 Gradients: conic gradients sweep the stops once around the center
A fourth gradient kind, conic (also accepted as `angle` or `conical`),
sweeps the stops once around the center (the gradient's start),
clockwise on the page from the vector, with a seam where the last stop
meets the first. A negative aspect mirrors the sweep, and reflecting an
object turns its sweep the other way, also for a conic without a
vector or with a flat extent.

- Gradient panel: a Conic button in the Type row; the Aspect Ratio
  field works for conic gradients and keeps a mirrored sweep mirrored.
- Gradient tool: the extent ellipse, aspect handle and center ring of a
  radial gradient, without a focal point.
- Rendering, swatch chips, transforms, warps, plug-in round trips, and
  Object > Expand into wedges or a mesh of columns around the center.
- Commands: a negative `aspect` is an error for linear and radial
  gradients, and so is a `focal` point for a conic gradient.
- PDF export writes a function-based shading whose calculator function
  turns the angle into the ramp, and PDF import reads a function-based
  shading that turns around the origin of its space back as a conic
  gradient, also when that origin lies outside the painted area. A
  PDF/A file, or a conic with more than 97 stops, gets an image
  instead.
- SVG export writes 360 solid wedges clipped to the shape for opaque
  stops and an image otherwise, and a linear gradient on characters.
- CSS export writes `conic-gradient(from ...)`, with the stops mirrored
  for a mirrored sweep.
- EPS and legacy .ai export write 360 solid wedges; the .ai editing data
  holds a linear gradient along the vector with the same stops.
- .af files: conical gradients open as conic gradients.
- An export that writes the gradient in another form gives a warning.

Supersedes #2326 and includes switch87's code from it.

Co-authored-by: Gert Pellin <gert@pellin.be>
2026-11-11 15:51:11 -08:00
jmvergesandClaude Opus 5.5 543034987e Envelopes: type's strokes paint at their own weight along the bent outlines (#6644)
With Envelope Options > Distort Appearance on, VectorCraft turned the strokes
of type in an envelope into filled outlines and bent them with the art, so a
stroke got thinner where the grid squeezes the type and thicker where it
stretches it. The drawn art of users' .ai files keeps those strokes as stroked
paths at the type's own weights, and the ring they paint is as wide wherever
the grid squeezes or stretches the type. An envelope of stroked type in such a
grid therefore didn't draw as its drawn art and kept it instead of opening live.

Type's strokes (its characters' and those on its own appearance) now paint
along the bent glyph outlines at their own weight, with Distort Appearance on
or off, also in an envelope inside an envelope:

- doc: `map_node` maps the groups that hold type's glyph outlines with
  `Hooks::type_appearance` in place of `Hooks::appearance`, for type in the
  envelope's contents and for type that a live object in them (an inner
  envelope) outlined (`Warper::type_outlines`). Such a group's opacity mask
  is mapped with the ordinary hooks, so it bends as other art does. Groups
  marked as type's outlines in the contents themselves (art an earlier Expand
  made) stay plain art.
- effects: `bake_type_appearance`, `bake_appearance` with strokes kept as
  strokes: geometry effects on type's fills and strokes still bake in and bend.
- doc: `max_outset` counts type's character strokes as type's own visual
  bounds do (`char_stroke_outset`). It left them out, though they already
  painted past an envelope's grid where the glyphs reach its edge; this also
  grows the visual bounds of blends and repeats of stroked type and the reach
  of symbol art holding it.

Paths' strokes, geometry effects, opacity masks, linear gradients and pattern
fills bend as before. The canvas, hit testing, effect bounds, Expand, every
export and the .ai save take the evaluation from the same hooks. Expand of an
envelope of stroked type gives the bent outlines with the strokes on them.
This changes how VectorCraft's own envelopes of stroked type draw.

Tests: envelope_distort::type_strokes_paint_at_their_own_weight_in_a_squeezed_envelope,
a_stroke_on_types_appearance_paints_at_its_own_weight_in_a_squeezed_envelope,
type_strokes_paint_at_their_own_weight_in_an_envelope_inside_an_envelope,
a_paths_stroke_still_bends_in_a_squeezed_envelope,
an_opacity_mask_on_type_bends_as_other_art,
the_visual_bounds_of_an_envelope_hold_its_types_strokes,
the_visual_bounds_of_a_repeat_of_stroked_type_grow_by_half_the_stroke,
expanding_an_envelope_of_stroked_type_keeps_the_stroke_at_its_weight,
bake::tests::type_pieces_bake_their_geometry_effects_and_keep_their_strokes and
tests_native::an_envelope_of_stroked_type_whose_drawn_art_strokes_the_bent_outlines_at_the_weight_opens_live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:45:33 +00:00
BFlat f9ff1caf54 Merge pull request #6648 from dotCooCoo/feat/dynamic-text-on-path
Type: Dynamic Text sizes type on a path to fill its brackets
2026-11-12 02:45:39 +07:00
dotCooCoo 2606b70604 Type: Dynamic Text sizes type on a path to fill its brackets
Type › Dynamic Text (`type.dynamicText`, also on the Contextual Task Bar
for type on a path) scales the text by one factor so it fills the span
between its start and end brackets, and the layout fits it again after
each edit to the text, the path or a bracket. The first character's
size moves in 0.1 pt steps within 0.1 to 1,296 pt. Turning it off, or
threading the type, keeps the sizes it was drawn at.

- The model saves `dynamicText` only when on.
- SVG, the legacy .ai writer and the .ai editing data write the drawn
  sizes through `vectorcraft_text::drawn`; the editing data warns that
  the setting is not written.
- Shrink Text to Fit and Dynamic Text step the size the Character panel
  shows when a size measures the cap height, x-height or ICF box.

Docs: docs/mcp.md, docs/type-parity.md, docs/target-app-parity.md.
Part of #4134.
2026-11-11 10:42:49 -08:00
BFlat 210e9ad7d0 Merge pull request #6632 from dotCooCoo/feat/ruler-guides-as-objects
Guides: ruler guides are document objects on their layers
2026-11-12 01:32:07 +07:00
BFlat 7c800f851f Merge pull request #6627 from storytold/fix/sec-eps-scan-charge
EPS import: charge scanned strings, end failed filter decodes, bound data sources and JPEG/TIFF headers
2026-11-12 01:08:41 +07:00
dotCooCoo 5ac7d97d85 Guides: ruler guides are document objects on their layers
Ruler guides were a list kept beside the layers. Each guide is now an
object of its layer or sublayer, always directly in it and above the
layer's art. These behave as on main:

- Guides draw on screen only. Exports (SVG, PDF, PNG, PSD), Fit All,
  Select All, the art bounds, clicks and marquees, and a layer's
  Pathfinder and Transform effects leave them out. The Layers panel
  lists them as guide rows of their layer, the highest guide.list
  index first.
- Deleting a layer deletes its guides, and merging layers keeps their
  guides in the merged layer.
- The guide commands number guides as guide.list does, in the order
  they were made.

New: each guide takes an id from the document's object ids. An object
command given a guide's id fails with an error, and node.move cannot
put a guide into a group or out of its layers. A guide made while an
opacity mask, a symbol or a pattern is edited moves to the top
visible, unlocked layer when editing ends.

File format: native files still save the guides in the document's
guides list, in every file version, so older builds read them. Each
entry may now also carry the guide's id, name, locked and hidden
flags; older builds ignore those fields. Opening a file puts each
saved guide on its layer (on the top visible, unlocked layer when the
file names none or a layer it does not have), and each saved guide
counts against the object limit for opening a file. A ruler guide node
that a file holds below a layer's art moves up to the layer's guides,
and one anywhere else (in a group or another object, beside the
layers, or in a symbol) is removed. Ruler guides read from an .ai file
become guide objects on the layer they were on, numbered in the order
the file lists them.
2026-11-11 09:52:28 -08:00
Dylan M. Taylor e4c7688428 EPS import: charge scanned strings, end failed filter decodes, bound data sources and JPEG/TIFF headers 2026-11-11 17:26:05 +00:00
jmverges 4556f7718e Merge remote-tracking branch 'upstream/main' into fix/envelope-edit-contents
# Conflicts:
#	docs/file-format-parity.md
2026-11-11 15:19:51 +00:00
ruchirguitar 68ff19f0f1 Merge remote-tracking branch 'origin/main' into fix/6502-ai-layer-colour-index
# Conflicts:
#	docs/file-format-parity.md
2026-11-11 17:52:50 +05:30
jmvergesandClaude Opus 5.5 8b39cbc324 .ai save: stroked type keeps its cap, join and miter limit
The text document writer wrote a type stroke's paint and weight but not
its cap, join or miter limit, which .ai import reads since #6500 (keys
61, 62 and 64). A file saved here and opened again came back with butt
caps, miter joins and a miter limit of 10, and the save reported those
attributes as left out. A stroked run now writes the three keys,
numbered as PostScript numbers caps and joins, with the miter limit as
import takes it back (1 to 500, else 10), and they no longer count as
lost. A run without a stroke no longer counts them as lost either: they
draw nothing.

Follow-up to #6472.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 11:25:55 +00:00
ruchirguitar 2d030e1edb #6502: .ai layer colour index follows the file's numbering
A layer's Lb colour index was its position in LAYER_COLORS, but the file
numbers Magenta, Cyan and Yellow 4, 5 and 6 where LAYER_COLORS has Yellow,
Magenta and Cyan. Save (editing copy and legacy) and open now map the index
both ways; LAYER_COLORS keeps its order and the other 24 presets are unchanged.
2026-11-11 16:21:48 +05:30
jmvergesandClaude Opus 5.5 112fe53d88 .ai import: an envelope in Edit Contents opens on its drawn art when its mesh lies away by a move (#6570)
While an envelope's contents are edited, the editing data keeps its mesh
in the envelope's dictionary. In some users' files that mesh lies away
from the drawn art by a plain move, the contents sitting with the drawn
art, as if the mesh hadn't followed the envelope when it moved. The
envelope then drew its contents elsewhere, failed the drawn-art check
and kept its drawn art. Nothing in the dictionary records the move, and
no envelope saved outside Edit Contents was found displaced.

A mesh or top object saved in Edit Contents (and a warp of type tried
on its saved grid) whose mesh draws the contents as large as the drawn
art, within half a point over width and height together, but further
from it than that, is now tried again after every other way, with one
more of the import's checks, its mesh moved by as far as the drawn
art's box lies from the box of what it draws. The drawn-art check, the
budget and the page comparison decide as before, so an envelope that
opened live before opens the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 10:39:39 +00:00
jmvergesandClaude Opus 5.5 6701a1f8e5 .ai import: stroked type in an envelope maps from its glyphs grown by half its stroke
With Distort Appearance, the stroked candidate for type in an envelope
mapped from the type's bounds with strokes, which for a stroke on the
type's appearance (or on a group round it) reach as far as a miter join
may at a corner, the miter limit times half the weight. In users' files
the drawn art maps from the glyphs grown by what the strokes paint along
a side: half the weight of a centred stroke. The candidate now uses that
box. Character strokes keep the measure the type's bounds with strokes
already give them (they have no miter allowance), and other objects in
the contents keep their bounds with strokes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 06:49:26 +00:00
BFlat b34c652a60 Merge pull request #6514 from ruchirguitar/fix/5820-general-units-for-unitless-files
#5820: files that record no units open in Preferences › Units › General
2026-11-11 12:35:44 +07:00
ruchirguitar 52918add2d #5820: keep ruler units the EPS program header gives when the editing data has none 2026-11-11 10:12:00 +05:30
BFlat bc814012d9 Merge pull request #6511 from dotCooCoo/feat/artboard-color-labels
Artboards: an artboard's guide label colors its own guides
2026-11-11 11:27:16 +07:00
ruchirguitar f5daa27a2f #5820: files that record no units open in Preferences › Units › General
A PDF, an EPS or .ai without ruler units, a raster image, a metafile, an
Affinity file or an importer plug-in's document opened (and reverted) in
points whatever the General unit was. They now open in the General unit,
as the reference app opens files that record no unit. Native, SVG and DXF
files and a .ai or EPS with %AI5_RulerUnits keep their own units. Only the
displayed units change, not the art.
2026-11-11 09:56:19 +05:30
dotCooCoo beef32b8a3 Artboards: an artboard's guide label colors its own guides
Each artboard can carry a guide label: one of the layer colors or a
custom RGB. Guides that belong to an artboard draw in its label color,
and guides without an artboard, or on an artboard without a label, keep
the guide color from the preferences. Selected guides still draw in the
selection color.

- Artboard Options has a Guide Label row (None, the layer colors with
  swatches, or Custom with a color swatch).
- artboard.new and artboard.setProps take guideLabel: null, a layer
  color's name, or #rrggbb. Any other value is an error. The inspect
  summary lists guideLabel when one is set.
- The native format saves the label and skips it when unset; a preset
  index outside the layer colors reads as no label.
- artboard.setProps no longer adds an undo step when nothing changes.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-10 19:37:17 -08:00
jmvergesandClaude Opus 5.5 d0c99cba4b .ai import: a warp of type's second try leaves checks for the envelopes after it
A warp of type may now spend up to four checks (its warp and its saved
grid, each with and without strokes). A try after the first is only
made while more checks are left than there are envelopes of type and
warped text objects still to come, so one envelope's retries don't use
up the checks of the others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 03:06:24 +00:00
jmvergesandClaude Opus 5.5 198bb6dffd .ai import: an envelope's grid reads its way round from every row and column
Summing only the end rows and columns let a grid symmetric about its
middle (a mesh bent halfway round) read by rounding, so it came out
turned or not depending on where it sat on the page. Every row and
column is now summed, a sum shorter than 1% of its parts (or than the
grid's reach) counts as no direction and falls back to the first row or
column, and the same comparison decides both cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 03:06:24 +00:00
jmvergesandClaude Opus 5.5 37e3c0215a .ai import: type in an envelope may map from its bounds with strokes
With Distort Appearance, an envelope's contents map from the box the
file measured for them: their bounds with their strokes or without
them. For type, the size the file saves for that box is often out of
date, so it can't say which. Envelopes of type are now checked both
ways: as before, and mapping from their bounds with their strokes.
Whichever draws as the drawn art opens live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 03:06:13 +00:00
jmvergesandClaude Opus 5.5 7504a0e2e4 .ai import: an envelope mesh bent far round reads the way it runs
An envelope's mesh is turned upright by which way its rows and columns
run. That was read from the first row alone, so a warp bent past halfway
(its end columns leaning more than 45 degrees) read as turned round and
mapped its contents across instead of along. Read it from the first and
last rows and columns added up instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 03:06:13 +00:00
jmvergesandClaude Opus 5.5 8f3f6a82d7 .ai import: a warp of type opens as a mesh envelope on its saved grid
A warp of type whose own warp doesn't draw as its drawn art is checked
again as a mesh envelope on the grid the editing data saves for it, its
points and handles as saved. Where that draws as the drawn art, it opens
live in its place: the type stays editable in that shape, and the warp's
style and bend are lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 03:06:13 +00:00
jmvergesandClaude Opus 5.5 83245cfe54 .ai import: stroked type keeps its cap, join and miter limit (#6472)
The text document reader set a type stroke's paint and weight but never
its cap, join or miter limit, so every stroked text object imported from
a .ai or EPS editing copy drew with a miter join at a limit of 10. Type
the file strokes with round joins, or with a miter limit of 4 or less,
drew long spikes at its sharp corners.

Keys 61, 62 and 64 of a run's character attributes (the run, its
character style, then the document defaults) are now read as the
stroke's cap (0 butt, 1 round, 2 projecting), join (0 miter, 1 round,
2 bevel) and miter limit, as PostScript numbers caps and joins. In the
users' files the page strokes type with exactly these settings. Other
values keep the defaults, a miter limit is capped at 500, and type
without a stroke keeps the defaults.

- ate.rs: Style reads the three keys and char_style passes them on,
  with a unit test over defaults, character styles, run overrides,
  hostile values and unstroked type.
- tests_native.rs: an imported story with round, bevel, default and
  unstroked runs.
- docs/file-format-parity.md: revision row, status line, one line on
  the mapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 02:20:38 +00:00
ruchirguitarandClaude Opus 5.5 163ce1731b G9: .ai font set keys on version too; test /5 (#6388)
Two installed versions of one font are two fonts of the set, so each
keeps its own /5. The generated variable test font now has a version
(name ID 5), and the test checks each variable record writes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 01:30:11 +05:30
ruchirguitar 971800c92c Merge remote-tracking branch 'origin/main' into fix/6388-ai-variable-font-instance
# Conflicts:
#	docs/file-format-parity.md
#	docs/gaps.md
2026-11-11 00:31:15 +05:30
ruchirguitarandClaude Opus 5.5 405062084d G9: .ai save names a variable font instance's design space (#6388)
A variable font's CoolTypeFont record in the text document now carries
/4 (its design vector, one 16.16 value per fvar axis) and /5 (its
version string), and the font set keys on name plus design vector, so a
named instance or a run's own axis setting no longer opens at the
font's default instance. Static fonts are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 00:25:12 +05:30
jmvergesandClaude Opus 5.5 309d7e5363 Envelopes: put back only the outermost drawn art, and keep hidden type until the drawn art is found
The put-back after a failed page check replaces each live envelope with
its drawn art in one go, which fails as a whole when one envelope lies in
another's art: only the outermost are put back now. A live envelope of
type removes its hidden type only once it has found the drawn art it
replaces. The file format docs lose a revision row left twice by a rebase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:26:29 +00:00
jmvergesandClaude Opus 5.5 06d0651ebf .ai import: an envelope of type bound to a visibility variable keeps its drawn art
A variable library binds the text object a slot of the envelope's
contents became, which stays hidden beside the drawn art. Once the
envelope opened live that hidden text object went, and its type in the
envelope has an id of its own, so a visibility binding was dropped and
counted as one that wasn't made. A slot bound to a text variable
already kept the drawn art; one bound to a visibility variable does
too now, with the note, so the binding is kept.

Carrying the binding over to the type in the live envelope would bind
an object inside an envelope's contents, which nothing in the import,
the data sets or the .ai writer is known to handle, so it is left for
later.

Part of #3179.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:26:19 +00:00
jmvergesandClaude Opus 5.5 bf716bfecc .ai import: envelopes of type keep their drawn art in layers used though they differ from the page
An envelope of type opens live only where the layers with it draw as
the page. Two ways of using layers that don't left it live all the
same: the editing data trusted (they come from it with a note), and
the objects that draw differently coming in as the page's art. In both
the envelope now keeps its drawn art and its type, hidden, with the
note, as where its drawn art is put back. A .ai whose layers would
open alone, without its PDF part, then opens alone again, as it did
before envelopes of type could open live, rather than compared with
the page.

The type put back no longer carries the mark of type made from the
text document in its name.

Part of #3179.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:26:19 +00:00
jmvergesandClaude Opus 5.5 0916b40654 .ai import: the page check weighs a live envelope of type as the art it draws
The comparison with the page counts the area of each text object that
shows as type, which it holds to less (type laid out again from the
file's text can sit a little apart from the page's). It took the text
object in a live envelope's contents for such type, at its own unbent
box, so most of what an envelope of type draws went unweighed: one
opened live where the page draws other art there, with only a note
that the type differs. The envelope draws its type bent, as art, and
is now weighed as such, as the drawn art it takes the place of is.

Part of #3179.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:26:19 +00:00
jmvergesandClaude Opus 5.5 47b20b4366 .ai import: envelopes of type open live where they draw as their drawn art
An envelope whose contents hold type kept its drawn art, with the type
hidden, because the type is laid out from the text document only after
the layers are read. It now waits for that, as warped type does: once
its text slots hold their type, the envelope is made of that type and
drawn by VectorCraft's own rule, and where it draws as the drawn art the
file saves (the same check and budget as other envelopes) it takes the
drawn art's place, with the type visible and editable in Edit Contents.
The hidden copy of the type goes.

As other live envelopes are, it is held to the page: when the layers
with it don't draw as the page, its drawn art and hidden type are put
back. A .ai whose layers would open alone, without its PDF part, now
waits on the PDF part when an envelope of type is in them; where none
opens live, the layers open alone as before. Layers built without a page
leave envelopes of type their drawn art.

Elsewhere it keeps its drawn art and hidden type, with the note: type in
a font that isn't available, a slot without made type (threaded, bound
to a text variable, a wrap object, type a look draws), an envelope that
doesn't read, no check left, or one that draws differently. Envelopes in
a symbol's or a pattern's art keep their drawn art.

Part of #3179.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:26:19 +00:00
jmverges 636c7951f9 Merge main into fix/3179-envelope-type-note
# Conflicts:
#	docs/file-format-parity.md
2026-11-10 11:00:42 +00:00
jmvergesandClaude Opus 5.5 3b1b5c7d47 .ai import: the live envelope and warped type check sees white art (#6412)
The check that keeps a live envelope or warped type only where it draws
as the art saved with it renders each on its own, over nothing, and
compared the pixels as seen on white. White art over nothing looks like
nothing on white, so white contents that drew somewhere else passed and
opened live in the wrong place.

Pixels now also differ when they look different seen on black, so such
art keeps its saved art, as colored art does. Opaque colored art is
compared as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 07:59:02 +00:00
jmvergesandClaude Opus 5.5 b5f62c75b9 .ai import: the envelope type note doesn't promise the type is kept
A text slot the text document gives nothing is left out, with a note of
its own, so the note for type in an envelope no longer says the type is
kept hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 03:15:38 +00:00
jmverges 14b2a60e73 Merge main into fix/3179-envelope-type-note
# Conflicts:
#	docs/file-format-parity.md
2026-11-10 03:15:38 +00:00
jmvergesandClaude Opus 5.5 c67a624128 .ai import: a note for type in an envelope (part of #3179)
An envelope of type keeps its drawn art with its type hidden, but nothing
in the import notes said so, while the other envelopes that keep their
drawn art do. Opening such a file now notes that the type in an envelope
comes in as the envelope's drawn art, not as editable type, and that the
type is kept hidden. The type is still not editable in the envelope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 02:40:38 +00:00
jmvergesandClaude Opus 5.5 0aeb8e8792 .ai import: images in a spot ink's Separation space keep their ink (#6350)
An image whose color space XC sets to one ink (n [c m y k /DeviceCMYK
(name) /Separation] XC) opened as a gray RGB image: its samples, the ink's
tints (255 at 100 %), were read as gray levels, so the tints drew inverted
and the ink was lost.

It now opens as a grayscale image of the tints, black at 100 %, colorized
by the ink at 100 %: its spot swatch, a process plate's CMYK color, or
Registration. Its alpha channel becomes its opacity mask, a reduced large
image's too (a colorized image reduced to fit the limits no longer keeps
its alpha in its pixels). 8-bit and 1-bit samples, binary or in hex
comment lines. A device space and the ink None change nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 02:07:53 +00:00
JonRC d439d734e6 EPS import names the missing fonts of the document's type (#6326 follow-up)
The warning #6326 added listed the families `set_text` met while the
page ran. An Illustrator EPS can be rebuilt from its editing copy,
whose type may be in other fonts than the page's, and `stringwidth` and
`charpath` reach `set_text` without adding any type. The families are
now taken from the text objects of the document the import gives (its
layers and its symbols), once each, in the order the type comes,
whichever path built it.
2026-11-09 14:01:27 -03:00
JonRC ddbc0d545a Fix #6320: EPS import warns about fonts that aren't available
Type set in a family that isn't available keeps its name and shows in
the fallback font, as in PDF import, but EPS import said nothing. It
now notes each such family once, in the order its type comes (at most
64), and ends with PDF import's warning: "fonts that aren't available
show in the fallback font until they are: <families>".

Tests that set type in fonts the test machine may lack (Helvetica,
Ryumin, made-up names) check the program's warnings without that note,
since which fonts are installed depends on the machine.
2026-11-09 12:31:17 -03: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