mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-29 21:49:17 +00:00
Merge upstream/main into cursor/properties-quick-actions-groups
Resolve docs conflicts in gaps.md, roadmap.md, target-app-parity.md and ui-parity.md: take main's Last reviewed banner, keep both history rows (newest first). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -422,6 +422,7 @@ Stop opacity on translated artboards remains outside this regression coverage.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-26 | minor | `.ai` and EPS import: where the text document makes the type of every text object that shows, point type made from it is matched with the page's type where it draws. Made type has no layout when it is matched, and its box was the estimate of type without one (0.55 em a character, running right from its anchor): beside right-aligned type, over half of centered type, across vertical type, and too short for a wide font. The page's type there was counted as type with no text object, with the note "some of the page's type has no text object in the layers, so it is left out" (a loss, so `convert` wouldn't write over the file), and the made type went on to be weighed against the page as type the page may not draw, and could be taken out. The box of made point type that shows now comes from its layout in the fonts the import has; the text object keeps no layout, so the document measures it when it opens, as before. Files where some text object's type isn't made keep the estimate: there the page's pieces where made type draws can belong to text objects stacked on it. The page comparison takes the same box for the layers' type areas (`type_areas` in `compare.rs`): made point type that differs from the page (laid out again, or in another font) counts as type where it draws, whatever its alignment. Counted as art beside the estimate, it could send the file to its PDF part or page, or be noted as art that differs. A file whose layers failed the comparison that way and opened without it now passes it and shows its notes. Tests `right_aligned_and_centered_point_type_takes_the_pages_type_where_it_draws`, `centered_point_type_at_a_heading_s_size_takes_the_pages_type_where_it_draws` and `right_aligned_point_type_that_differs_from_the_page_differs_as_type` in `crates/eps/src/import/tests_native.rs`, and `made_point_type_s_box_is_where_its_alignment_and_orientation_draw_it` in `crates/eps/src/import/native/slots.rs`. Scores and estimates unchanged. |
|
||||
| 2026-11-22 | minor | EPS import: type in a Type 1 or Type 42 font the file carries, whose family isn't available, is drawn in a TrueType font built from the glyphs the file shows (outlines and advances from the font program), kept with the document as PDF import keeps a PDF's (#4569), and spaced by those glyphs' own advances; once its text is edited it takes the fallback font. A string that draws a character with another glyph than the one kept for it comes in as outlines. The warning names those families with PDF import's words ("show as the file draws them, in the fonts it carries, until their text is edited"). Fonts the file only names, Type 3 fonts and type from an Illustrator editing copy are unchanged. Tests `embedded_type1_type_draws_with_the_files_glyphs`, `a_second_glyph_for_a_character_keeps_its_type_as_outlines`, `kept_type1_glyphs_survive_saving_and_go_when_the_text_is_edited`, `type_in_fonts_that_arent_available_is_named_in_a_warning` in `crates/eps/src/import/tests_type1.rs`, `type_in_a_carried_type42_font_draws_with_the_files_glyphs` in `crates/eps/src/import/tests_type42.rs`; scores unchanged |
|
||||
| 2026-11-19 | minor | `.ai` import: a stroke's arrowheads were left out, so lines came in without their heads (#8188). A Stroke Style filter's stroke dictionary names each end's head as a symbol of the file (`/GObjRef : (name) /SymbolArt ; (BSArrowBeginSymbol)` or `(BSArrowEndSymbol)`), with its scale in percent (`BSArrowEndScale`, and `BSArrowBeginScale` read the same way; 100 without one). As the files have it, such a symbol's art (y down, as symbols are read) points right along a straight, level sample of the line: an open stroked path with no fill, which ends where the line stops under the head. The rest of the art that paints is the head, its tip its rightmost point, at one symbol unit a head weight (the stroke's weight at the scale). The head comes in as a custom arrowhead with that outline and that stop (a custom head now carries an optional stop, else its line ends halfway along it, as before). Its placement is the one of the two (tip on the end of the path, or Extend, the tip past it by the line's length under the head) that gives the object its drawn art's bounds; the user's file has every tip on its path's end. A stroke keeps its drawn look when neither placement gives those bounds (heads on other subpaths, say) or both do while a head moves 0.2 pt or more between them (a line whose end lies inside the bounds of its other segments), when its symbol isn't read whole or isn't read as a head (no sample or more than one, a sample that isn't 1 pt wide, as in art stored at a Large Canvas scale, art other than paths, compound paths and groups such as a clip group, a group with fills or strokes of its own, effects, brushes, partial opacity or an opacity mask), when its dictionary holds another `BSArrow` entry beside heads, when a scale is outside 1–1000 %, or when the head's weight would be under the 0.25 pt least one VectorCraft draws; a graphic style with such a stroke isn't read rather than read without its heads, and one with heads takes them on the end of the path, so an object whose heads are read past its ends isn't linked to its listed style. Measured on a user's file of ten arrows (used locally, never committed): every line gets its heads, and drawn at 4× its pixels match the file's own page but for 3 of 9,825 inked ones (0.24.1: 1,232 differ). Tests `a_strokes_arrowhead_symbols_are_its_arrowheads`, `a_strokes_start_arrowhead_points_back_and_keeps_its_side`, `a_stroke_takes_both_heads_at_their_own_scales`, `heads_drawn_past_the_path_extend_it`, `arrowheads_this_does_not_read_keep_the_drawn_look`, `an_arrowhead_entry_without_heads_leaves_the_stroke_read` in `crates/eps/src/import/ai/tests.rs`, `heads_whose_placement_the_drawn_bounds_leave_open_keep_the_drawn_look`, `a_head_that_stays_put_leaves_a_moving_heads_placement_open`, `a_style_library_reads_the_heads_of_symbols_defined_after_its_styles` in it, `a_symbol_entry_cut_short_leaves_the_next_style_read` and `a_comment_inside_a_symbol_entry_is_skipped` in `crates/eps/src/import/ai/style/tests.rs`, `partly_transparent_or_masked_art_makes_no_head` in `crates/eps/src/import/ai/arrowhead.rs`, fuzzed by `ai_arrowhead_strokes_never_panic`; scores unchanged |
|
||||
| 2026-11-19 | minor | PDF import (#8549 follow-up): type filled and stroked after a page of type filled only came in as a filled object and a stroked one: since #8549 lines filled only are kept for a stroke pass too, and the glyphs of the lines finished past the 64 kept were remembered until the next stroke, so `2 Tr (Title) Tj` after more than 64 lines of type filled only took its first stroke for the start of a stroke pass over them, always once more than 4,096 glyphs had been finished so. Those glyphs are now forgotten when anything else is drawn (a path, an image, a Type 3 glyph's art, a change of blend mode or soft mask: nothing is drawn between an operator's fill pass and its stroke pass), and past the first 4,096 glyphs none are remembered instead of every stroke matching. A `TJ` over more lines than are kept still comes in as a filled object and a stroked one for each part, also when it ends where it began, and when a glyph kept as an outline comes before that (the line it starts keeps the glyphs of the lines finished). Remaining: with nothing drawn between them, type filled and stroked at exactly the place, font, size and text of a glyph filled only on a line finished so still comes in as a filled object and a stroked one, as the device can't tell its stroke pass from the start of one over that glyph. Tests: `type_filled_and_stroked_after_a_dense_page_of_filled_type_is_filled_and_stroked`, `type_filled_and_stroked_over_a_finished_glyph_after_a_path_is_filled_and_stroked`, `an_outline_glyph_in_a_tj_over_more_lines_than_are_kept_leaves_fill_and_stroke_apart`; scores and estimates unchanged. |
|
||||
|
||||
+7
-1
File diff suppressed because one or more lines are too long
+88
-3
@@ -3396,6 +3396,85 @@ VectorCraft writes files by these rules of its own:
|
||||
`Script file dialogs need a person to answer them`, and takes no kept grant. In the app, a file dialog inside a
|
||||
built-in's callback, a getter, a conversion or a file `$.evalFile` runs throws an error.
|
||||
|
||||
`new ExternalObject("lib:AdobeXMPScript")` defines the globals `XMPMeta`, `XMPFile` and `XMPConst`
|
||||
([the help page](https://extendscript.docsforadobe.dev/scripting-xmp/xmpscript-object-reference/)); any other library
|
||||
name throws `ExternalObject: the library … is not available`, and no native library is loaded. VectorCraft's own
|
||||
rules for these objects:
|
||||
|
||||
- `XMPMeta` reads a packet given as a string (`new XMPMeta(packet)`) and writes one with `serialize(options?)`, with
|
||||
the packet wrapper unless `XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER` is given. It has `getProperty`, `setProperty`,
|
||||
`deleteProperty`, `doesPropertyExist`, `countArrayItems`, `getArrayItem`, `appendArrayItem`, `insertArrayItem`,
|
||||
`setArrayItem`, `deleteArrayItem`, `doesArrayItemExist`, `getLocalizedText` and `setLocalizedText`, and the
|
||||
functions `XMPMeta.registerNamespace`, `getNamespacePrefix` and `getNamespaceURI`. A path is a property name,
|
||||
`prefix:name`, or either with `[n]` (from 1) or `[last()]` for an array item. `insertArrayItem` with
|
||||
`XMPConst.ARRAY_LAST_ITEM` inserts before the last existing item and rejects an empty array. `insertArrayItem`
|
||||
and `setArrayItem` store `null` as an empty item value. Arrays hold simple items; a structure
|
||||
or a value with qualifiers that a packet holds is kept as it was written, and `getProperty` gives its options. An
|
||||
array item with an `xml:lang` qualifier has the qualifier and language options in `getProperty` and `getArrayItem`.
|
||||
`getLocalizedText` returns an `XMPProperty` with the selected text, locale and options; its `namespace` and `path` are empty strings.
|
||||
VectorCraft returns `undefined` when the property is absent or its language alternative array is empty.
|
||||
`appendArrayItem` keeps explicit item options, value and array options in their parameter slots, including `undefined` or `null` item options.
|
||||
A string value can use the shorter call form; a null value with numeric array options can also use that form. A
|
||||
value with qualifiers in the `rdf:value` form also gives the text of its `rdf:value`, and an empty property element
|
||||
whose attributes are fields is a structure. The namespaces that a packet's property, element and attribute names use are registered with the prefix the packet
|
||||
gives them, or `prefix_1_` when that prefix names another namespace; a namespace the packet declares but no name
|
||||
uses is not registered. At most 4,096 namespaces, holding at most 1 MiB together, are registered. A namespace URI
|
||||
over 1,024 bytes, a prefix over 128 bytes, and a namespace past either limit throw `… the XMP data is too large`,
|
||||
both from `registerNamespace` and from a packet that uses the namespace. The prefix limit applies to a namespace
|
||||
being registered, with any `_n_` suffix added to its prefix; a namespace already registered keeps its prefix, and
|
||||
`registerNamespace` returns that prefix whatever prefix it is given. An `rdf:Alt` item with `xml:lang=""` has no
|
||||
language, so its array is not a language alternative for `getLocalizedText` and `setLocalizedText`.
|
||||
- `XMPFile(path, format, openFlags)` reads a file through the same places as `File`, so a path outside them, a
|
||||
missing file and a file over 8 MiB throw the `File` messages (`Script file access denied`, `Script file does not
|
||||
exist`, `Script file exceeds 8 MiB`). A `.xmp` file is read whole as its packet (a link counts by the file it leads to,
|
||||
when it is opened and again when it is written); any other file, and any file with
|
||||
`XMPConst.OPEN_USE_PACKET_SCANNING`, is scanned for its first UTF-8 packet and is read only. A packet starts at a
|
||||
`<?xpacket begin=` whose header holds `id="W5M0MpCehiHzreSzNTczkc9d"` within 256 bytes; inside a packet, a start
|
||||
or a trailer in a CDATA section or a comment is text, except that a section that does not close, or that holds a
|
||||
trailer and then a start, is read as text around them. Only a `.xmp` file
|
||||
opened with `XMPConst.OPEN_FOR_UPDATE`, without packet scanning, takes `putXMP`, and opening one that way where
|
||||
the script may not write throws `Script file access denied`; other files open read only with that flag.
|
||||
After `putXMP`, `closeFile()` writes the packet in
|
||||
UTF-8 through a temporary file in the same folder when the script may write there, otherwise straight to the file;
|
||||
when no temporary name is free, nothing is written. The written packet omits a leading XML declaration and retains
|
||||
the following packet bytes. On Unix the replacement keeps the file's permission bits, group
|
||||
and (on Linux) access ACL, as a saved document does, and is readable by its owner alone where the group or the ACL
|
||||
cannot be kept; on a volume that refuses Unix permissions (SMB, FAT) the update still goes through. The packet is flushed to the disk before the temporary file takes the file's
|
||||
name. With `XMPConst.CLOSE_UPDATE_SAFELY`, `closeFile()` writes only
|
||||
through a temporary file, and where the script may not make one it throws `Script file could not be written` and
|
||||
leaves the file as it is. A failed write throws and keeps the file open with its packet. While an open `File` of the same file holds changes it has not written, `closeFile()` throws
|
||||
`Script file could not be written` and the `File` keeps its changes. `getXMP`, `getPacketInfo`, `getFileInfo` and `canPutXMP` are available. An `XMPFile` is open only in the
|
||||
run that opened it. Its file state is native, and assigning script properties does not change that state.
|
||||
A successful close or the next script file run releases its packet buffers.
|
||||
After a successful update, an open `File` reader with a UTF-8 byte order mark or UTF-16 encoding
|
||||
restarts in UTF-8 at the beginning of the replacement packet. A UTF-8 reader without a byte order mark keeps its position,
|
||||
limited to the replacement packet's length.
|
||||
- On Unix, `closeFile()` flushes the destination folder after writing the packet. If that flush fails,
|
||||
it throws `Script file could not be written`, and the file already contains the replacement packet.
|
||||
Open readers use that packet, `written` names the file, and the `XMPFile` keeps its pending packet for retry.
|
||||
- Registered namespace storage and expanded XML values count toward the script's heap limit.
|
||||
`canPutXMP` checks string packets without retaining their expanded XML values.
|
||||
Pending packets count once toward that limit. Library installation checks its members before
|
||||
publishing `ExternalObject`, in both ES5 and ES2015 realms. Serialization consumes fuel even
|
||||
when its escaped output exceeds the packet limit. Packet-info scans and metadata size accounting during edits also consume fuel.
|
||||
The sidecar-write host binding accepts packets up to VectorCraft's 8 MiB packet limit.
|
||||
- A packet over 8 MiB, one that is not well-formed XML, one with a document type declaration or an undefined entity,
|
||||
one with text beside its `rdf:Description` elements or their properties, and one nested more than 64 elements deep
|
||||
throws. Only spaces, tabs, carriage returns and line feeds count as indentation. A qualified name's prefix
|
||||
and local name must each be valid XML names without a colon. Explicit `rdf:about` values must agree, including empty values.
|
||||
A nonempty `xml:lang` on an `rdf:Description` or inherited from its ancestors is not available yet and throws instead of discarding the language.
|
||||
An empty `xml:lang` on that description clears an inherited language. Explicit property-level language qualifiers are retained.
|
||||
A value is counted as deep as `serialize()` would write it, under `x:xmpmeta`, `rdf:RDF` and
|
||||
`rdf:Description`. A packet that would be written with more than 1,024 attributes on one element, or more than
|
||||
1,024 namespace declarations in scope at one element, throws
|
||||
`… the XMP data is too large`, both from `serialize()` and when a packet with such a value is read. Members of the help page that are not built yet (iterators,
|
||||
structure fields, qualifiers, aliases, sorting, byte-array packets and `XMPFile.getFormatInfo`) throw
|
||||
`… is not available yet`, and so does a flag, format or path form that is not handled yet.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"script.run","params":{"source":"new ExternalObject('lib:AdobeXMPScript'); var m = new XMPMeta(); m.setProperty(XMPConst.NS_DC, 'format', 'image/svg+xml'); vc.log(m.serialize());"}}}
|
||||
```
|
||||
|
||||
`script.grants {}` lists the kept grants: `{grants: [{script, sha256, code, path, write, folder}], file, error?}`, with `code`
|
||||
the SHA-256 of each evaluated source (of its UTF-16 code units in little-endian order), `folder` true for a folder's
|
||||
grant, which covers everything in the folder (a file's grant covers its own path only, also when a folder later
|
||||
@@ -10194,6 +10273,7 @@ layer of its own below the others; files that carry the editing data (Preserve E
|
||||
Export for Screens) keep it as the artboard's color, not as art. `includeArtboardFill: false` on `document.export`,
|
||||
`document.serialize`, `document.exportForScreens` (Include Artboard Fill) or `file.print` leaves it out. `inspect_document`
|
||||
lists it as the artboard's `color` (`#rrggbb`), and `ui.colorPicker {artboard: index}` opens the Color Picker for it.
|
||||
The artboard preview and confirmation require the opening document to be active.
|
||||
|
||||
Artboard Options' Show Center Mark and Show Cross Hairs: `artboard.setProps {index, showCenterMark?: bool,
|
||||
showCrossHairs?: bool}` (or each entry of `artboards`) turns them on or off for that artboard in one undo step, and
|
||||
@@ -10689,6 +10769,8 @@ listed in `warnings`. ASCII and binary DXF files are read; DWG files answer an e
|
||||
|
||||
## Links panel
|
||||
|
||||
`links.replaceEmbedded {ids, dataBase64}` uses raster file bytes to replace existing canvas images. It embeds the new pixels and keeps the image ids. The new aspect ratio fits inside the old bounds, and a distorted image keeps its corners. The command records one undo step and returns `{replaced: [ids]}`. The browser's Replace Image uses this operation with the file picker result.
|
||||
|
||||
`links.list {show?: all|missing|modified|embedded, sort?: name|kind|status|size}` lists every image in the layers, top
|
||||
first, as the Links panel does (`sort: "size"`, the panel menu's Sort by Size, puts the smallest file first by the
|
||||
size Link Info shows; rows without one, embedded images and missing files whose size is not kept, come last, and equal
|
||||
@@ -13974,6 +14056,8 @@ has, or an empty one, keeps the dialog open, and Cancel adds no style. A plain c
|
||||
once.
|
||||
|
||||
`ui.charStyleOptions {name}` opens Character Style Options for an existing named style.
|
||||
The dialog previews and saves changes only in the document where it opened. If another edit is active in
|
||||
that document, preview pauses and OK reports an error until that edit ends. Cancel rolls back only the dialog's own preview.
|
||||
Character Style Options uses `charStyle.edit {name, to, attrs}` to replace the name and complete sparse
|
||||
attribute map in one undo step. `to` is trimmed and must be unique. The command updates text using the style
|
||||
while preserving local overrides; Undo/Redo restores the definition and its users. The `charStyleOptions`
|
||||
@@ -16886,10 +16970,11 @@ Unit Converter is a built-in add-on that shows one length in every unit at once
|
||||
`addon.units.convert` and `addon.units.selectionSize`, and in the desktop app it lives in Object › Plug-ins › Unit
|
||||
Converter and in its panel (`window.panel {panel: "unitConverter"}`). Neither command changes the document.
|
||||
|
||||
`addon.units.convert {value, unit?}` reads `value` as a number field reads it: a number, or text with a unit suffix and
|
||||
`addon.units.convert {value, unit?}` accepts a number, or text with a unit suffix and
|
||||
`+ - * /` arithmetic, where `x`, `X` and `×` multiply as `*` does (`"10mm"`, `"1in/2"`, `"2p6"`, `"1080/2 px"`,
|
||||
`"3cm*50%"`, `"2x3 mm"`, `"13q"`), a decimal comma read as a point (`"0,5 mm"`) and a single number with a thousands
|
||||
comma (`"1,000 mm"`) refused, in at most 1024 bytes with at most 128 `+ - * /` signs (each multiplication sign counts).
|
||||
`"3cm*50%"`, `"2x3 mm"`, `"13q"`). The command reads an unambiguous decimal comma as a point (`"0,5 mm"`).
|
||||
It refuses numbers that look like grouped integers, whether alone (`"1,000 mm"`) or in arithmetic (`"1,500+2"`).
|
||||
Text may contain at most 1024 bytes and 128 `+ - * /` signs (each multiplication sign counts).
|
||||
A number without a suffix is in `unit` (a unit's name, suffix or key: `points`, `picas`, `inches`, `millimeters`,
|
||||
`centimeters`, `pixels`, `feetInches`, `meters`, `yards`, `feet`, `q`, `ha`; default `points`); a suffix in the text
|
||||
takes precedence over `unit`. It works without an open document. The command fails when `value` is missing, does not
|
||||
|
||||
+8
-3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user