Commit Graph
611 Commits
Author SHA1 Message Date
BFlat 9fcddf68d1 Merge pull request #6849 from dotCooCoo/feat/warp-images
Warp: the Warp effects bend an image's pixels with its frame
2026-11-12 21:04:22 +07:00
BFlat e280b28393 Merge pull request #6871 from dotCooCoo/fix/eps-predefined-cmap-type
EPS import: CIDFonts only named, over a predefined CJK CMap, set their characters as live type
2026-11-12 21:04:13 +07:00
BFlat 6961a96f89 Merge pull request #6842 from dotCooCoo/fix/legacy-ai-vertical-roman-tcy
Legacy .ai: type keeps Standard Vertical Roman Alignment and Tate-chu-yoko
2026-11-12 21:03:45 +07:00
dotCooCoo 842f1f1b68 EPS import: CIDFonts only named, over a predefined CJK CMap, set their characters as live type
Type in a font found by name with a predefined non-Unicode CMap, such as
`/Ryumin-Light-83pv-RKSJ-H findfont` or a `composefont` with `GBK-EUC-H`,
opened as Latin-1 letters (`ú{A` for 日本A) in a font whose style carried
the CMap name (`Light-83pv-RKSJ-H`). Only Unicode CMaps were split off the
font name, and `composefont` failed with `undefinedresource` for the others.

- The predefined CMap decoder used by legacy `.ai` type moves to
  `import/predefined_cmap.rs`, and EPS import decodes these CMaps' codes
  with it (Shift-JIS, EUC, GBK, Big Five, UHC and the other public CMaps).
- A font name splits at a predefined CMap unless an installed face has
  the whole name. A CMap that can't be read gives a warning.
- Type over a vertical CMap (`-V`) is set as vertical type, and each code
  moves the point one em down the column, the default `DW2`
  displacement.
- Every show operator sets decoded type with the same spacing and shaping
  as other fonts found by name.
- Decoding a string counts against the import's memory budget.
2026-11-12 05:01:14 -08:00
dotCooCoo 67ebbf0b53 Merge main into feat/warp-images 2026-11-12 04:59:37 -08:00
BFlat 7f9866f42a Merge pull request #6818 from dotCooCoo/feat/korean-line-break-anywhere
Type: Korean words break at spaces unless Korean Line Break Anywhere is on
2026-11-12 19:13:57 +07:00
dotCooCoo 63a8efc1f3 Merge main into fix/legacy-ai-vertical-roman-tcy 2026-11-12 02:28:16 -08:00
dotCooCoo cdcac345a9 Legacy .ai: type keeps Standard Vertical Roman Alignment and Tate-chu-yoko
Horizontal type keeps both marks, and the legacy .ai writer writes such
type as text, but the marks were dropped without a warning. Version 7
text has operators for both (section 15.3.4 of the published format
specification): Tv for Roman characters upright in vertical writing,
and TY for a Kumi block in horizontal text recorded for later vertical
use. The writer now writes 1 Tv and 0 Tv, and 1 TY and 0 TY, where a
run's mark changes, closes an open Kumi block before the text object
ends, and writes neither operator for type without the marks. The
legacy .ai reader reads both back onto the same characters. The prolog
defines Tv and TY so the file still runs as PostScript.
2026-11-12 01:08:24 -08:00
dotCooCoo 96ad9344ee Merge main into fix/warp-styles-map 2026-11-11 23:31:05 -08:00
dotCooCoo ff826ed1bd Type: Korean words break at spaces unless Korean Line Break Anywhere is on
Korean text broke after every Hangul syllable. A paragraph now has
Korean Line Break Anywhere, set from the Paragraph panel menu (with the
East Asian options), from the East Asian Composition Settings section of
Paragraph Style Options, and with `text.setFormat {koreanLineBreakAnywhere}`.

- Off, a word that contains Hangul (the characters between spaces) breaks
  only at its spaces and after East Asian punctuation, or where the word
  is wider than the line. Both composers follow it, and the word takes no
  hyphen. On, a line may break between any two syllables, as before.
- New type has it off. Paragraphs and text objects saved before the
  option read as on, so their lines do not move; the value is saved only
  when it is off.
- Paragraph styles carry it, Reset Panel turns it off, and the .ai writer
  reports it as lost for Korean paragraphs.

The help page: https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/set-line-breaks-korean-text.html

The command is described in docs/mcp.md, and docs/target-app-parity.md
lists the option.
2026-11-11 23:06:55 -08:00
dotCooCoo 00b53a3222 Merge main into feat/dynamic-text-release-path 2026-11-11 22:03:30 -08:00
dotCooCoo 66d21471ae Gradients: diamond gradients run the stops from the center out to a square
A new gradient kind, `diamond`, runs its stops from the center (the
start) out to a square with a corner at the end of the vector; the
aspect stretches the square across the vector into a rhombus. The
Gradient panel's Type row has a Diamond button, the Gradient tool draws
the square with the aspect handle and center ring, and a gradient
fitted to an object covers its box.

- Model and canvas: the level is |x| + |y| in the square's frame; a
  square with no area (no vector, an aspect of 0, numbers out of range)
  paints the last stop. The canvas draws it as pixels, out to a
  stroke's miters, caps and arrowheads. Transforms keep the vector and
  take the mapped size across it as the aspect.
- Commands: `paint.setFill`, `paint.editGradient` and
  `paint.setGradientGeom` take `kind: "diamond"`; a negative aspect or
  a focal point is an error. A conic or diamond gradient that a plug-in
  returns with a focal point loses the focal point.
- Gradient tool: dragging the aspect handle of a radial or diamond
  gradient whose file gave it a negative aspect now sets a positive
  aspect; only a conic's negative aspect mirrors it.
- Export: PDF, SVG, EPS and legacy .ai write four linear gradients, one
  for each quarter of the square, clipped to the shape (PDF as axial
  shadings). PDF and SVG write an image for translucent stops, a
  dithered fill or a flat square, and for the Perceptual method unless
  PDF writes the stops as spot color shadings. SVG writes a diamond on
  type characters as a radial gradient through the corners, and so
  does CSS. A swatch library saved as CSS gets four corner layers, a
  value for the `background` property (a circle when the swatch is
  turned by an angle that is not a multiple of 90 degrees). The .ai
  editing data holds a radial gradient through the corners. The
  document exports give a warning.
- SVG export: a stroke drawn as an image, as conic wedges or as diamond
  quarters now covers the miters, caps and arrowheads that reach past
  its paint box.
- PDF import reads a function-based shading whose color is the same
  along each square about the origin of its space as a diamond.
- Object > Expand gives nested squares or a mesh of rings.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-11 20:27:48 -08:00
dotCooCoo e609b26a95 Warp: bend each style as one Bézier patch, and keep saved warps' look
Each of the fifteen Warp styles now bends the bounds as one Bézier patch.
The style sets the patch's control points from the bend and the size of
the bounds, the horizontal distortion scales each column of control
points about its middle, and the vertical distortion scales each row.
The Warp effects and warp envelopes share the map (`WarpNet`). Content
with no width or no height takes the middle of the patch along that
side.

A warp carries the map it draws with as `version`. New warps, the
built-in graphic styles' Warps and warps opened from .ai files get 1.
Warps in .vectorcraft documents saved before the version existed read
as 0 and keep the earlier map, so those documents keep their look.
Edits keep a warp's version, and Warp Options editing several objects
keeps each one's own. effect.apply, effect.setParams and the warp
envelope commands take `version` 0 or 1 (`1.0` counts as 1) and refuse
any other value. An .ai file holds a warp's settings and not its
version, so a version 0 warp saved to .ai opens again with version 1.
The .ai writer compares a style's settings without the version, so
saved warps still export as editable effects.

Docs: docs/mcp.md (Envelopes), docs/effects-parity.md (Warp),
docs/target-app-parity.md.
2026-11-11 19:40:01 -08:00
dotCooCoo 558568d531 Merge main into feat/dynamic-text-release-path 2026-11-11 18:48:20 -08:00
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
dotCooCoo 39683ecdd9 PDF/.ai export: fit Dynamic Text before resolving font heights
The legacy .ai writer resolved cap-height and other font height
references to em sizes before fitting, so Dynamic Text stepped and
limited the em size instead of the size the Character panel shows, and
the type could be written smaller than it is drawn. It now fits first,
and outlines come from the type's own layout.

The editing data now also warns that Dynamic Text is not written when
the type is written as outlines.
2026-11-11 13:55:47 -08:00
dotCooCoo b426822a9c Type: Release Type on a Path keeps the size Dynamic Text drew the type at
Release Type on a Path copied the stored runs into point type with the
Dynamic Text flag still set, so the text dropped back to its stored size
and the file saved the flag on point type. The point type now gets the
drawn sizes and the flag is turned off.

The legacy .ai writer writes Dynamic Text type at its drawn sizes; it
now also warns that the setting itself is not written, as the editing
data writer does, whether the type is written as text or as outlines.

docs/target-app-parity.md lists reshaping or scaling the path among
VectorCraft's own rules, and a task bar comment marks leaving the item
out for threaded type as VectorCraft's own rule.
2026-11-11 13:06:51 -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