mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 13:15:12 +00:00
Merge remote-tracking branch 'upstream/main' into fix/tracking-horizontal-scale
# Conflicts: # docs/file-format-parity.md
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# File format parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-11 · **Change:** minor (`.ai` and EPS import, PDF import: tracking and manual kerning in horizontally scaled type take the Horizontal Scale, as the file's page spaces such type; `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid, #3179; `.ai` and EPS import: stroked type keeps its stroke's cap, join and miter limit from the text document, #6472; `.ai` save: type in a variable font's named instance names its design-space setting, #6388; `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page, #3179; `.ai` and EPS import: a note for type in an envelope, #3179; `.ai` and EPS import: the live envelope and warped type check sees white art; PDF import: DeviceN images of one ink or of process plates keep their inks, #6348; `.ai` import: images in a spot ink's Separation space keep their ink, #6350; PDF import: Separation images keep their ink, #6314; PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; PDF import: image masks open colorized by the color they are painted in, #6313; EPS and `.ai` editing data: a ligature the page names by a private-use glyph matches its text object; EPS import: CIDFonts only named, over a Unicode CMap, set as live type; EPS import: CMap mappings to base-font codes and glyph names; EPS import: CID-keyed fonts in FontSets (CFF) draw their glyphs; EPS import: `kshow` procedures kern live type; EPS import: embedded Type 1 fonts' glyphs and widths; EPS import: CID-keyed fonts draw their glyphs; EPS import: Type 42 fonts' characters and widths from the font they carry, show operators' spacing kept as tracking; EPS import: an image decoder's own buffers stop counting against the memory budget once it is decoded; EPS import: sampled functions interpolate between their samples; `.ai` and EPS type from the text document keeps its tab stops; it keeps auto leading and hyphenation options, and may show more of the file's last lines in an area frame; `.ai` and EPS import: Art brushes in the older form of their objects come into the Brushes panel; EPS import: gradients drawn as abutting strips come in as one gradient, without seams; EPS import: composite fonts draw their Type 42 glyphs; SVG import: filter and mask regions clip, #5876, #5875; SVG import: Gaussian blurs keep `color-interpolation-filters`, #5877; PDF and `.ai` export: objects' URLs as links, #5785; SVG import: `color-interpolation="linearRGB"` gradients, #5878; `.ai` import: paths with a Calligraphic brush open brushed, #372) · **Target:** Adobe Illustrator 2026 (30.x)
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-11 · **Change:** minor (`.ai` and EPS import, PDF import: tracking and manual kerning in horizontally scaled type take the Horizontal Scale, as the file's page spaces such type; `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke, #3179; `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid, #3179; `.ai` and EPS import: stroked type keeps its stroke's cap, join and miter limit from the text document, #6472; `.ai` save: type in a variable font's named instance names its design-space setting, #6388; `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page, #3179; `.ai` and EPS import: a note for type in an envelope, #3179; `.ai` and EPS import: the live envelope and warped type check sees white art; PDF import: DeviceN images of one ink or of process plates keep their inks, #6348; `.ai` import: images in a spot ink's Separation space keep their ink, #6350; PDF import: Separation images keep their ink, #6314; PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; PDF import: image masks open colorized by the color they are painted in, #6313; EPS and `.ai` editing data: a ligature the page names by a private-use glyph matches its text object; EPS import: CIDFonts only named, over a Unicode CMap, set as live type; EPS import: CMap mappings to base-font codes and glyph names; EPS import: CID-keyed fonts in FontSets (CFF) draw their glyphs; EPS import: `kshow` procedures kern live type; EPS import: embedded Type 1 fonts' glyphs and widths; EPS import: CID-keyed fonts draw their glyphs; EPS import: Type 42 fonts' characters and widths from the font they carry, show operators' spacing kept as tracking; EPS import: an image decoder's own buffers stop counting against the memory budget once it is decoded; EPS import: sampled functions interpolate between their samples; `.ai` and EPS type from the text document keeps its tab stops; it keeps auto leading and hyphenation options, and may show more of the file's last lines in an area frame; `.ai` and EPS import: Art brushes in the older form of their objects come into the Brushes panel; EPS import: gradients drawn as abutting strips come in as one gradient, without seams; EPS import: composite fonts draw their Type 42 glyphs; SVG import: filter and mask regions clip, #5876, #5875; SVG import: Gaussian blurs keep `color-interpolation-filters`, #5877; PDF and `.ai` export: objects' URLs as links, #5785; SVG import: `color-interpolation="linearRGB"` gradients, #5878; `.ai` import: paths with a Calligraphic brush open brushed, #372) · **Target:** Adobe Illustrator 2026 (30.x)
|
||||
|
||||
Every format Illustrator opens, places, saves or exports, against VectorCraft's format table (`FORMATS`,
|
||||
`OPEN_EXTS`, `PLACE_EXTS` in `crates/engine/src/cmd/fileio/formats.rs`). Illustrator's list comes from its public
|
||||
@@ -340,6 +340,7 @@ Stop opacity on translated artboards remains outside this regression coverage.
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-11 | minor | `.ai` and EPS import, PDF import, SVG export and `.ai` save: type with a Horizontal Scale other than 100% and tracking or manual kerning is spaced as a `.ai`'s own page spaces it. Layout now measures tracking and manual kerning in thousandths of the em as the scale draws it (see type-parity.md, same date); they were added at the full em, so such type drifted from the page letter by letter. A `.ai`'s page writes that type's character spacing as the tracking itself in a text space as wide as the scale, which PDF scales by it (ISO 32000-1 §9.4.4). In 224 users' files (used locally, never committed), 93 render differently. Of the 25 whose render moved by more than 1% of its pixels against the page, 23 came closer. The note on the type differing from the page shows a smaller share in 5 files (11.0% to 4.4% at most) and a larger one in 2 (by 0.2 to 0.3 points). 9 more envelopes of type open live (113 to 122 of 203, none fewer in any file), and no file switched between its layers and its PDF part. PDF import: the tracking of horizontally scaled type is the file's `Tc` in thousandths of its size (it was that times the scale), the glyphs where they were (test `tests::text_placement::character_spacing_in_horizontally_scaled_type_is_the_files_tc`). SVG export writes the letter spacing in thousandths of the font size it writes (the vertical scale), so type scaled uniformly keeps its spacing in a viewer (test `text_layout::spacing_in_uniformly_scaled_type_takes_the_scale`); tracked type scaled horizontally alone still differs a little there, as before. A `.ai` saved here writes the same values as before; VectorCraft now lays them out as the file's own PDF part draws them. Scores and estimates unchanged. |
|
||||
| 2026-11-11 | minor | `.ai` and EPS import: stroked type in an envelope with Distort Appearance is tried mapped from its glyphs grown by as far as its strokes paint along a side (half the weight of a centred stroke), without what miter joins add at corners, for a stroke on its appearance or on a group round it as well as its characters'; it was mapped from its bounds with strokes, which reach as far as a miter join may at a corner. Tests `ai::envelope::tests::stroked_type_is_tried_mapped_from_its_glyphs_grown_by_half_its_stroke`, `type_with_a_character_stroke_is_tried_mapped_from_its_bounds_with_strokes`, `a_stroke_on_a_group_of_type_grows_the_box_by_half_its_weight` (part of #3179) |
|
||||
| 2026-11-11 | minor | `.ai` and EPS import: a warp of type (an envelope made with a warp around type) whose own warp, VectorCraft's, doesn't draw as its drawn art is tried again as a mesh envelope on the warp grid the file saves, with the same drawn-art check, budget and page comparison as #6421: where it passes, the type is editable and keeps the file's shape, and the warp's settings (style, bend) are lost. A second try is only made while more checks are left than there are envelopes of type and warped text objects still to come. Type with strokes in an envelope with Distort Appearance on is also tried mapped from its box with strokes, where the size the file saves for it doesn't already give that box (a rule chosen by measuring real files). An envelope's grid (warp, mesh or top object) now reads its way round from all its rows and columns, not its first row alone: a mesh bent far round (its end columns leaning more than halfway over) reads the way it runs, not turned a quarter round, and a grid symmetric about its middle reads the same wherever it is on the page. Tests `tests_native::a_warp_of_type_opens_as_a_mesh_on_its_saved_grid_and_keeps_its_shape_when_its_text_changes`, `a_warp_of_stroked_type_maps_from_its_bounds_with_strokes_where_its_drawn_art_does`, `a_warp_of_type_without_a_saved_grid_keeps_its_drawn_art`, `a_warp_of_type_tried_again_leaves_the_next_envelope_its_check`, `ai::tests::a_mesh_envelope_bent_far_round_opens_the_way_it_runs`, `a_mesh_envelope_bent_halfway_round_opens_the_same_way_wherever_it_is` (part of #3179) |
|
||||
| 2026-11-11 | minor | `.ai` and EPS import: type stroked in the text document keeps its stroke's cap, join and miter limit (keys 61, 62 and 64 of its character attributes, numbered as PostScript's `setlinecap` and `setlinejoin`: 0 butt or miter, 1 round, 2 projecting or bevel). They were left at a miter join with a limit of 10 whatever the file said, so type the file strokes with round joins, or with the usual limit of 4 or less, drew spikes at its sharp corners, some many points long. In users' files, used locally and never committed, the page strokes the type with the cap, join and miter limit these keys give; no file had a bevel join, which is read by the same numbering. A value that isn't one of theirs keeps the default, a miter limit past 500 is 500, and type without a stroke keeps the defaults. Dashes are not read: no file had dashed type to tell which keys hold them. Tests `ate::tests::a_run_keeps_its_stroke_cap_join_and_miter_limit`, `tests_native::stroked_type_keeps_its_cap_join_and_miter_limit`; scores unchanged |
|
||||
| 2026-11-10 | minor | `.ai` and EPS import: an envelope of type (a warp, a mesh or a top object around type) kept its drawn art, its type hidden, because the type is laid out from the text document only after the layers are read. It now waits for that: its text slots get their type, and where VectorCraft's own envelope of that type draws as the drawn art the file saves (the same check and budget as other envelopes, seen on white and on black), it opens live in the drawn art's place, its type editable in Edit Contents, and the hidden copy goes. As with other live envelopes, the layers with one are then compared with the page, which weighs the envelope as the art it draws (not as type laid out again, which the comparison allows more for), and when they don't draw as it the drawn art and the hidden type are put back. Layers used though they don't draw as the page (the editing data trusted, or the objects that differ coming in as the page's art) leave envelopes of type their drawn art and hidden type too. A `.ai` whose layers would open alone, without its PDF part, imports the PDF part to compare them with, and should they still not draw as it, or should no envelope of type open live, they open alone as before, with the envelopes' drawn art. Type in a font that isn't available, slots without type of their own (threaded, bound to a text or a visibility variable, a wrap object, type a look draws), envelopes in a symbol's or a pattern's art, and envelopes that draw differently keep their drawn art, with the note (#3179). Tests `tests_native::an_envelope_of_type_that_draws_as_its_drawn_art_opens_live`, `an_envelope_of_type_that_draws_apart_from_its_drawn_art_keeps_it`, `an_envelope_of_white_type_that_draws_apart_from_its_drawn_art_keeps_it`, `an_envelope_of_type_waits_on_the_page_of_layers_that_would_open_alone`, `an_envelope_of_type_that_draws_apart_from_the_page_does_not_open_live`, `trusted_layers_that_draw_apart_from_the_page_leave_an_envelope_of_type_its_drawn_art`, `layers_with_objects_that_come_in_as_the_page_art_leave_an_envelope_of_type_its_drawn_art`, `an_envelope_of_type_bound_to_a_visibility_variable_keeps_its_drawn_art` |
|
||||
|
||||
+53
-10
@@ -1549,7 +1549,7 @@ describes that menu item. Pass exactly one of `path` and `source`. A `path` must
|
||||
case. A `.jsxbin` file or text that starts with `@JSXBIN@` is compiled and ends with an error, as does text that is
|
||||
not UTF-8. The language is ES5.1, except that identifiers take the characters Unicode's `ID_Start` and
|
||||
`ID_Continue` properties allow, as later editions define them, and may use `\u{...}` escapes. The script reaches the
|
||||
app through the global object `vc`, and writes to the Script Console through `$`:
|
||||
app through the global object `vc`, and writes to the Script Console and runs other files through `$`:
|
||||
|
||||
- `vc.run(id, params)` runs a command and returns its result. A command that fails throws an error the script can
|
||||
catch. The documents and the session state the command changed, preferences included, go back, and any file it
|
||||
@@ -1561,9 +1561,41 @@ app through the global object `vc`, and writes to the Script Console through `$`
|
||||
- `vc.log(value)` adds a value to the report and a line to the Script Console.
|
||||
- `$.write(...values)` writes the values to the Script Console with no separator, each as `String(value)` gives it, and
|
||||
`$.writeln(...values)` does the same and ends the line. Each call counts as a host call.
|
||||
- `$.evalFile(path, timeout?)` runs the file `path` names, relative to the file being run, in the same global
|
||||
environment, so its functions and variables stay defined, and returns its last value (`undefined` for an empty
|
||||
file). Its preprocessor lines are read as the script's are. `timeout` is a number of milliseconds from 0; the file
|
||||
is read at once and `timeout` is not waited on. The run's fuel and limits apply to the file. An empty path, a
|
||||
missing file and a refused path throw errors the script can catch.
|
||||
- `$.fileName` is the file being run, which is the file `$.evalFile` is running while it runs, and is empty for a
|
||||
script given as `source`. `$.includePath` is the current `#includepath` list, separated by `;`.
|
||||
- `vc.args` is the `args` object.
|
||||
- `vc.api.version` is `"1.0"`, and `vc.api.has(feature)` says whether the API has a feature.
|
||||
|
||||
Before any of the script runs, its preprocessor lines are read. The help page
|
||||
https://extendscript.docsforadobe.dev/extendscript-tools-features/preprocessor-directives/ describes these lines, and
|
||||
https://extendscript.docsforadobe.dev/extendscript-tools-features/dollar-object/ describes `$.evalFile`, `$.fileName`
|
||||
and `$.includePath`. A line counts when it starts with `#` or `//@`, after blanks only, outside strings and comments.
|
||||
VectorCraft reads them by these rules of its own:
|
||||
|
||||
- `#include "file"` and `//@include "file"` put the text of that file in place of the line. A value with spaces or
|
||||
punctuation goes in single or double quotes. The file is looked for beside the file that includes it, then in each
|
||||
`#includepath` folder in turn, then in each folder of the `JSINCLUDE` environment variable (absolute folders
|
||||
separated by `;`). The included file must be a whole script on its own. A file may be included again after its
|
||||
earlier inclusion has ended, and a file that includes itself, directly or through others, is an error.
|
||||
- `#includepath "a;b"` sets the folders `#include` looks in, separated by `;`. A relative folder is relative to the
|
||||
folder of the file that includes. A later `#includepath` replaces the list.
|
||||
- `#script "name"` names the run in the report and the Script Console, unless `name` is given. A `#script` line in an
|
||||
included file does not rename the run.
|
||||
- `#target` takes any value and does not change how the script runs. `#strict off` is taken.
|
||||
- `#strict on`, `#targetengine` and `#engine` end the run with an unsupported-directive error, and any other `#name`
|
||||
with an unknown-directive error. A `//@` line with another name is a comment.
|
||||
- A script run from a file reads its included files and the files `$.evalFile` runs only in that file's folder and
|
||||
the folders below it. A path with a `..` name, a path that leads out of the folder through a link or a junction, a
|
||||
Windows device name or stream, and a computer on the network are refused, and so is every path for a script given as
|
||||
`source`. A `JSINCLUDE` folder outside the script's folder is passed over.
|
||||
- A missing or refused included file ends the run before any of it runs. An error in an included file or a file `$.evalFile`
|
||||
ran is reported at that file's line and column, and the report's `file` names the file.
|
||||
|
||||
The run is one transaction. When the script ends, each document it changed gets one undo step named Run Script. A
|
||||
run that changes no document adds no undo step. The journal records each command the run finished, as it records
|
||||
commands run one at a time. A preference the run changed takes the run's value, and a preference changed in the app
|
||||
@@ -1590,7 +1622,8 @@ VectorCraft sets these limits itself:
|
||||
|
||||
| Limit | Value |
|
||||
|-------|-------|
|
||||
| Source text | 8 MiB |
|
||||
| Source text | 8 MiB a file, 32 MiB in all |
|
||||
| Included and evaluated files | 64 in all, 16 levels deep, 1,024 paths looked up |
|
||||
| Heap | 256 MiB (128 MiB on the web) |
|
||||
| Host calls | 2,000,000 |
|
||||
| `maxFuel`, instructions in all | 1 to 100,000,000,000; 1,000,000,000 by default |
|
||||
@@ -1607,7 +1640,8 @@ In the app, a script past the growth limit stops at a question to continue or to
|
||||
with an error at that limit. The headless reply is `{ok: true, name, changed, written, log, fuelUsed, hostCalls,
|
||||
runTimeMs, timingAvailable, hostCallCounts, slowestCommands, console}`. In the app the reply is `{running: true,
|
||||
name}`, and the report appears later as `scriptReport` in `ui.inspect`. The report of a failed run has the same
|
||||
fields after `kind`, `message`, `line`, `column` and `fuelLeft`. `answers` takes only an empty object, since scripts
|
||||
fields after `kind`, `message`, `line`, `column`, `file` (when the error is in another file than the script) and
|
||||
`fuelLeft`. `answers` takes only an empty object, since scripts
|
||||
have no prompts yet.
|
||||
|
||||
- `runTimeMs` is the time the script ran, its commands included. Waits between frames and for a person's answer are
|
||||
@@ -1626,7 +1660,8 @@ vectorcraft-cli run --cmd script.run --params '{"path": "Tidy Layers.js", "args"
|
||||
```
|
||||
|
||||
Window › Script Console shows the session's script lines, oldest first: each run's start, its `$.write` and
|
||||
`$.writeln` output, its `vc.log` entries, its uncaught error as `name:line:column: message`, its end, and a report of
|
||||
`$.writeln` output, its `vc.log` entries, its uncaught error as `name:line:column: message` (or `name: file:line:column: message` when the error is in another
|
||||
file), its end, and a report of
|
||||
its time, host calls and slowest commands. Each line shows the run's number and the script's name. Line feeds,
|
||||
carriage returns and the two together break lines, and other control characters show as their Unicode Control
|
||||
Pictures. The console keeps at most 2,048 lines and 1 MiB of text and drops the oldest lines past that. A line longer
|
||||
@@ -3724,14 +3759,18 @@ the canvas (coordinates out of range)".
|
||||
`path.setHandle`, `path.moveAnchor` and `path.insertAnchor` edit subpath 0 when `subpath` is absent or null, and refuse a `subpath` that
|
||||
is not a whole number of 0 or more, such as 1.5, -1 or "1" ("missing integer `subpath`"); `path.split` refuses such
|
||||
an `anchor` or `segment` in the same way. The document does not change and no undo step is recorded.
|
||||
`path.insertAnchor` keeps the direct-selected anchors and selected segments of the path on the same points: those
|
||||
after the new anchor on its subpath are numbered one higher, and a selected segment that the new anchor splits stays
|
||||
selected as its two halves, with the new anchor as an end of both that moves with them. Undo restores the path and
|
||||
the selection in one step.
|
||||
|
||||
`path.reshape {id, x, y, dx, dy, tol?, focal?, radius?}` (a Reshape tool drag) grabs the path at `x`, `y`, adding an
|
||||
anchor there unless one lies within `tol` (3 by default), and moves that point by `dx`, `dy`.
|
||||
[Adjust path segments](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-paths/adjust-path-segments.html)
|
||||
has the Reshape tool stretch part of a path from the dragged point without losing the path's general form, with every
|
||||
highlighted focal point pulling the path. Which anchors stay, how far the stretch reaches and the share of the drag each
|
||||
point takes are VectorCraft's own rule. The grabbed point and the anchors that `focal` lists as `[subpath, anchor]` pairs are focal
|
||||
points and move by the whole drag; a pair that names no anchor of the path is refused ("`focal` names [0, 7], which is
|
||||
point takes are VectorCraft's own rule. When `focal` is given (an empty list included), the grabbed point and the
|
||||
anchors that `focal` lists as `[subpath, anchor]` pairs are focal points and move by the whole drag; a pair that names no anchor of the path is refused ("`focal` names [0, 7], which is
|
||||
not an anchor of the path"). Anchors that are not direct-selected stay in place (on a path selected whole, or not
|
||||
selected, every anchor is selected), and so do the two ends of an open path unless they are focal points. A selected
|
||||
anchor between two focal points moves by the whole drag. A selected anchor between a focal point and an anchor that
|
||||
@@ -3744,8 +3783,11 @@ point does not move. An anchor added on a segment of a partly selected path is s
|
||||
anchors stay selected. With `radius`, only the grabbed point's subpath changes, whatever the selection: the anchors
|
||||
within `radius` of the grabbed point along the path follow with a smooth falloff and the others stay; a negative
|
||||
`radius` is refused ("`radius` must be 0 or more"), and so is `radius` given with `focal` ("`focal` and `radius`
|
||||
cannot be used together"). A drag of no length on an anchor (`dx` and `dy` 0 or left out) leaves the path as it is
|
||||
and records no undo step.
|
||||
cannot be used together"). Without `focal` (or with `focal` null) and without `radius`, the earlier rule applies, so
|
||||
steps recorded before focal points play as they did: the selection does not matter, an open path stretches from the
|
||||
grabbed point to its two ends as above, and on a closed path the anchors within half the diagonal of the subpath's
|
||||
bounding box follow with the smooth falloff. The Reshape tool always sends `focal`. A drag of no length on an anchor
|
||||
(`dx` and `dy` 0 or left out) leaves the path as it is and records no undo step.
|
||||
|
||||
With the Reshape tool, a click on an anchor of a selected path makes it the focal point, and a click on a segment adds
|
||||
an anchor there (one undo step) that becomes the focal point. Shift-click adds an anchor or a point on a segment to the
|
||||
@@ -6487,8 +6529,9 @@ with binding punctuation (`Tg`) on, which opens as `forced`. `none` isn't saved.
|
||||
`text.setFormat` and `text.setRangeStyle {tcyUpDown?, tcyLeftRight?}` set the Character panel menu's Tate-chu-yoko
|
||||
Settings of the characters, in points from -1296 to 1296 (document points, as `baselineShift`). In vertical type a
|
||||
block of tate-chu-yoko characters (`tateChuYoko`) moves up by a positive Up/Down and down by a negative one, and right
|
||||
by a positive Left/Right and left by a negative one. The block moves as one piece with the values of its first
|
||||
character, and keeps its one em down the column, its caret positions and its hit region. Two or three digits set
|
||||
by a positive Left/Right and left by a negative one. On a vertical path, a positive Up/Down moves the block toward the
|
||||
path's start and a positive Left/Right moves it to the path's left, with every path effect. The block moves as one piece
|
||||
with the values of its first character, and keeps its one em down the column, its caret positions and its hit region. Two or three digits set
|
||||
across the column without the mark do not move, and horizontal type keeps the values without moving the characters.
|
||||
Neither value turns `tateChuYoko` on. Both are 0 by default and saved only when not 0, and character styles carry
|
||||
them. A value that is not a number is refused with `` `tcyUpDown` must be a number ``, and one outside the range with
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user