Commit Graph
9507 Commits
Author SHA1 Message Date
BFlat c3c02f81e0 Merge pull request #9128 from dotCooCoo/fix/print-fonts-setting
Print: the Fonts setting chooses how PostScript output sends type
2026-11-24 16:06:58 +07:00
BFlat 87de595305 Merge pull request #9096 from dotCooCoo/fix/plugin-run-no-op-undo
Plug-ins: a run that changes nothing records no undo step
2026-11-24 16:06:33 +07:00
BFlat 7696b503e6 Merge pull request #9079 from dotCooCoo/feat/js-es2015-block-arrow-template
Scripts: .js scripts run let, const, arrows, templates, default and rest parameters and spread
2026-11-24 16:06:07 +07:00
BFlat c79555c25c Merge pull request #9070 from dotCooCoo/feat/scripts-unitvalue
Scripts: UnitValue measurements convert and calculate with their units
2026-11-24 16:05:51 +07:00
BFlat 50a4d049fb Merge pull request #9063 from dotCooCoo/feat/three-d-mesh-attributes
3D: meshes carry UVs, smooth bevel normals and a part index
2026-11-24 16:05:34 +07:00
BFlat 2e09e5135f Merge pull request #9046 from dotCooCoo/feat/quick-pen-arc-center-i9314
Pen: Quick Pen marks an arc's center with a cross while the arc is drawn
2026-11-24 16:05:16 +07:00
BFlat fd349e4d11 Merge pull request #9015 from dotCooCoo/fix/smooth-no-worse-pass
Smooth: a drag that would not make a path smoother leaves it as it was
2026-11-24 16:05:00 +07:00
BFlat 1bd8c8cb6e Merge pull request #8987 from dotCooCoo/fix/script-export-linked-files
Scripts: vc.run export of an open document reads its own linked files
2026-11-24 16:04:43 +07:00
BFlat 86a03fcdff Merge pull request #8986 from dotCooCoo/feat/dimension-alt-object-size
Dimension tool: Alt over a path places its overall width or height
2026-11-24 16:04:27 +07:00
BFlat 293dde3d19 Merge pull request #8981 from dotCooCoo/fix/smooth-region-bounds-prefilter
Smooth: a drag over a long path measures only the anchors and segments near it
2026-11-24 16:04:10 +07:00
BFlat 7d984fc7f3 Merge pull request #8964 from dotCooCoo/feat/plugin-manifest-section
Plug-ins: read the manifest from a custom section before running any code
2026-11-24 16:03:53 +07:00
BFlat b4696e31f6 Merge pull request #8933 from dotCooCoo/fix/relink-mask-matching-file-path-docs
Docs: a clipping mask that matches the old file's clipping path is relinked as the file's
2026-11-24 16:03:22 +07:00
BFlat 2d978d843c Merge pull request #8932 from dotCooCoo/fix/palette-typo-description-order
Command Palette: docs rank typo results that match a word by description last
2026-11-24 16:03:05 +07:00
BFlat ae0abde1a6 Merge pull request #8889 from dotCooCoo/fix/i18n-message-scan-escapes
i18n: the message scan reads string escapes the way Rust does
2026-11-24 16:02:14 +07:00
BFlat ca09a61d72 Merge pull request #8880 from dotCooCoo/fix/align-to-selection-anchors-docs
Align: align.toSelection returns "artboard" only for one object with no anchor points selected
2026-11-24 16:01:58 +07:00
BFlat 8b4a57f4e3 Merge pull request #8818 from dotCooCoo/fix/selection-widget-double-click-transform
Live Corners: a Selection tool double-click on a corner widget shows the Transform panel
2026-11-24 16:01:41 +07:00
BFlat 066aaed62f Merge pull request #8814 from dotCooCoo/fix/retype-drawn-shape-font-state
Retype: no retyped line starts with a combining mark
2026-11-24 16:01:24 +07:00
BFlat 2ef89d479e Merge pull request #8798 from dotCooCoo/fix/live-paint-bucket-journal-replay
Live Paint: bucket paint commands replay from the journal with any tool
2026-11-24 16:01:02 +07:00
BFlat 6f37bd839c VectorCraft on the craft UI framework (#8800)
VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.

About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.

Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
2026-11-24 08:25:24 +07:00
dotCooCoo a149f93392 Script checker: code the check can't read keeps a Folder's length, hidden and readonly setters
The check leaves out `length`, `hidden` and `readonly` set on `new
Folder(...)`, a `Folder` place, or a variable holding one, but a script
can give that name a File object in ways the check does not read. Such a
setter now counts as a file write in a check whose files:

- use `with`, or name `eval`, `Function`, `evalFile` or `constructor`,
  as a word or as a string literal in brackets (`this['eval'](s)`,
  `$['evalFile'](f)`, `(function () {}).constructor(s)`)
- read, call or assign a property in brackets when the brackets hold
  anything but one string or number literal (`this[k](s)`,
  `this['ev' + 'al'](s)`, `this[('eval')](s)`, `this[0, 'eval'](s)`,
  `$[k](f)`, `g[k] = ...`), including a preprocessor line inside the
  brackets
- assign a property in brackets whose name is a string literal longer
  than 256 characters, or properties of more than 1,000 names
- assign or declare `Folder`

A variable whose name a member assignment writes (`$.global.d = ...`,
`this.d = ...`, `this['d'] = ...`) counts as one that may hold a File
object. Array literals, `o['plain']` and `a[0]` leave the Folder alone.

docs/mcp.md and the progress line in docs/target-app-parity.md state the
rule.
2026-11-23 09:54:50 -08:00
dotCooCoo 26d2a08fe3 Merge main into fix/script-export-linked-files 2026-11-22 23:41:56 -08:00
5af36bae87 Fix #4568: PDF import keeps embedded fonts for text whose family isn't installed (#4569)
* PDF import: keep embedded fonts for text whose family isn't installed

Glyphs drawn in an embedded font whose family isn't available are gathered
during import and built into one small TrueType font per family and style,
kept with the document (font/ttf blob). Text objects record the fonts and a
hash of their text: layout and rendering draw them in the kept font until the
text is edited (undo restores it) or the family is installed. Lines are
spaced against the file's own widths with per-glyph placement (#3756).

* PDF import: satisfy crate layering constraints without format dev-dep

* FileFont: negate us_win_descent in i32 to prevent overflow on extreme negative descenders

* PDF import: a kept font carries the file font's licence flags, and the docs say what that means

Review of #4569: the fsType of the file's font is copied to the font built from its glyphs (a test pins it against Embedding), so exports honour it; the docs state the limits, that the file's font program is not parsed, and that a saved file carries third-party glyphs.

* PDF import: a glyph curve far outside any glyph is left out; docs say what the limits and the font program mean

CodeRabbit on #4569: coordinates beyond 1e6 font units are refused before the curve is subdivided. The docs say the 64-font limit is what draws one type object and that the file's font program is read only for its licence flags and metrics.

* PDF import: two programs of one font keep the stricter licence flags; the docs cite their sources

CodeRabbit on #4569: embedded programs of one family and style share one built font, which kept the first program's fsType; it now takes the stricter of the two, whichever came first. The docs entry cites the Acrobat Help pages and the OpenType fsType specification.

* fmt

* PDF import: embedded fonts are on by default, with an opt-out preference

Owner decision on #4568. Preferences > File Handling > Use fonts embedded in imported PDFs (pdfImportEmbeddedFonts, on by default) and the embeddedFonts param of document.open and file.place: off, a PDF's type in a font the machine lacks is set in the fallback font with the missing-font warning, as before. One test each for on and off, one for the preference reaching the options.

* fmt after merging main

* docs: restore the status lines damaged by merges (main's line plus this PR's note)

* PDF import: set embedded_fonts through a builder method (keeps read_opened under the complexity limit)

* PDF import: move the missing-font notes out of read_opened (complexity limit after the merge)

* #4569: isolate file-font resources and reclaim live faces (UNVERIFIED)

* Preserve carried-font ownership across placement and recovery

* Fix carried-font regression test dependencies and unwind probe

* Use explicit OS2 heights in owned-font reference regression

* Keep native font regression artwork inside document layers

* fix(engine): bind file fonts when reading document profiles

* test(engine): initialize file-font leases in new image fixtures

* test: complete file-font lease initialization in image fixtures

* docs: keep the #4568 entry in the file-format parity status line

* fix(pdf): keep a line with another glyph for the same character as outlines (review)

A font kept with the document has one glyph per character. A glyph of the file's font that
differs from the one already kept for its character (a stylistic alternate that maps to the same
Unicode scalar) marks its line, which is imported as outlines so each glyph draws as the file
does.

* docs: resolve the leftover status-line conflict

* Placed document blob: give the new ImageBlob literal its file_font

* Test: a PDF's two glyphs for one character survive a native save and reopen as the file draws them

* Test: move the native save and reopen half of the two-glyphs regression to the engine (layers: no format dev-dep in pdf)

* Fix embedded-font preference help and English fallback checks

* Format embedded-font preference help with the workspace edition

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: skylartaylor <hi@skylar.cc>
2026-11-22 18:18:18 -06:00
dotCooCoo e37b052028 Print: the PDF fonts note names the fonts drawn as outlines
PDF print embeds subsets only of the fonts whose licenses allow it and
draws the others as outlines. The note that None and Complete add now
says so, as do the Fonts params text, docs/mcp.md and the progress line.
2026-11-22 12:12:38 -08:00
dotCooCoo 2f465a09c3 Docs: ES2015 test262 counts include the tests that do not tokenize
The ES2015 subset now runs the tests whose sources the token reader
rejects, 151 more runs, so the evidence line gives 533 of 708 other runs
and lists the forms that the runs that do not parse use.
2026-11-22 11:03:57 -08:00
dotCooCoo 23ad161d30 Print: the Fonts setting chooses how PostScript output sends type
The Graphics section's Fonts setting was stored but no print writer read
it: PostScript output always drew type as glyph outlines.

- Subset (the default) defines, in each page's setup, Type 3 fonts drawn
  from the faces' outlines that hold only the glyphs that page shows.
- Complete defines every glyph of each face the job shows once, in the
  job's setup, and fails with an error before writing anything when the
  definitions would take more than 64 MB.
- None sends no font program: each page asks for the printer's copy by
  its PostScript name (%%DocumentNeededResources, %%IncludeResource) and
  names each glyph in an encoding, with a note naming each font.
- Type in a gradient or pattern, color glyphs, glyphs bent along a
  curved path, ruby and, under None, glyphs without names stay outlines.
  So does type in a font whose license forbids embedding, or, under
  Subset, allows only whole embedding, with a warning.
- Only the sheets the print order prints are drawn.
- PDF print still embeds font subsets; None and Complete add a note
  saying so, in the print and its preview.

Docs: docs/mcp.md, the print.setup params text, docs/target-app-parity.md.
2026-11-22 08:40:41 -08:00
dotCooCoo 15fefc9930 JavaScript: block functions, spread and global declarations follow ECMAScript 2015
- A block function whose name a function of an enclosing block declares is
  not assigned to the variable of that name.
- A labelled function in a block is made when the block is entered, and the
  parser checks it against the `let` and `const` names of its statement list.
- A function standing alone as an `if` branch gets a block of its own.
- Spread reads a `String` object by code point, and reads an array's length
  again before each element.
- A `var` or function declared on the global object stops a later `let` or
  `const` of its name until its property is deleted, and a `var` the global
  object cannot take is a `TypeError` before anything is declared.
- A call keeps its callee, receiver and arguments reachable until its frame
  holds them, and global and eval code keep their environment and their heap
  charge until their frame is pushed.
- Template objects are released when no code that can run holds their sites,
  even when one code has several sites.
- `Realm::set_es2015` during a run applies once the run ends.
- A template piece that spans lines does not let a preprocessor line start
  after it on its last line.
2026-11-22 08:21:30 -08:00
dotCooCoo 02ebfb7b8e Plug-ins: a run that changes nothing records no undo step
A filter run, a plug-in command, or a run that calls commands applied its
output through Session::edit, which records an undo step and marks the
document modified even when the output changes nothing. The output is now
applied to a copy first, as colorcmds::edit_if_changed does: only a copy
whose objects or kept documentData differ becomes the document, as one undo
step. Otherwise the document, its undo history and its saved state stay as
they were, and the run's objects are still selected.

Docs: params text of plugin.run and plug-in commands, docs/plugins.md,
docs/mcp.md, docs/target-app-parity.md.
2026-11-22 05:40:50 -08:00
dotCooCoo af91c28c64 Merge main into feat/scripts-unitvalue 2026-11-22 00:30:37 -08:00
dotCooCoo f287c5fabb Docs: name the failing test262 runs as ECMAScript 2015 rules 2026-11-21 23:07:28 -08:00
dotCooCoo 8d0001308f Merge main into feat/js-es2015-block-arrow-template 2026-11-21 22:52:36 -08:00
dotCooCoo c48b3e8c93 Merge main into feat/three-d-mesh-attributes 2026-11-21 22:34:22 -08:00
dotCooCoo 4b176782be 3D: caps, Rotate's plane and Inflate's faces take UVs in the object's bounds
Extrude & Bevel's caps, Rotate's plane and Inflate's front and back took
their texture coordinates in the bounds of each part's own rings, so a
part smaller than its object had its coordinates stretched to its own
extent and did not line up with the object's other parts. They now use
the bounds the solid is built with, which every part of one object
shares, as the Turn, Placing and Camera transforms already do.

The test the_parts_of_one_object_place_their_caps_and_planes_in_its_shared_bounds
builds a small part inside a larger object's bounds with each effect and
checks every front and back corner against the shared bounds.
2026-11-21 21:39:03 -08:00
dotCooCoo 675c53eed6 Merge main into fix/retype-drawn-shape-font-state 2026-11-21 21:21:54 -08:00
dotCooCoo cd03842fb1 Docs: path.smoothRegion states its sampling limits and acceptance test
docs/mcp.md now says the measuring spacing is a target (at least 4 and at
most 1,024 pieces per curved segment, fewer on subpaths of more than 256
segments) and gives the acceptance test as formulas: t1 <= t0 + 0.001 * s
and fewer anchors, t0 - t1 >= 0.000001 * s, or b0 - b1 > 0.0001 * b0,
with s the larger of t0 and 1. The roughness doc comment says the points
are about `step` apart.
2026-11-21 21:18:03 -08:00
dotCooCoo 68602e24ad Merge main into fix/smooth-region-bounds-prefilter 2026-11-21 21:11:55 -08:00
dotCooCoo 5379d77fec Merge main into feat/dimension-alt-object-size 2026-11-21 21:06:53 -08:00
dotCooCoo dc9a724b6a Merge main into fix/script-export-linked-files 2026-11-21 21:04:37 -08:00
dotCooCoo 39e2a19ee0 Merge main into feat/quick-pen-arc-center-i9314 2026-11-21 20:52:46 -08:00
dotCooCoo f312abf05a Merge main into fix/smooth-no-worse-pass 2026-11-21 20:52:42 -08:00
dotCooCoo 7d3094afe6 Scripts: .js scripts run let, const, arrows, templates, default and rest parameters and spread
vectorcraft-js gains Options::es2015, which reads and runs these
ECMAScript 2015 forms: let and const with block scope and their
temporal dead zone, a new let binding for each loop iteration,
function declarations scoped to their block (with the Annex B.3.3
variable outside strict mode code), arrow functions, template
literals and tagged templates, default and rest parameters, and
spread in array literals, calls and new. Spread reads arrays,
strings by code point and objects with a length, by index, and
throws a TypeError for anything else until iterators are added.

Eval code outside strict mode code cannot declare a var that clashes
with a let or const around it, or with a parameter inside a default
value. Spread, template objects and the new scopes take fuel and
count against the heap limit, and nested arrows and templates count
against the depth limit.

script.run sets the option for a .js file; eval, Function, #include
files, $.evalFile and a kept #targetengine read code the way the
running script does. A .jsx file and a source string stay ES5.1.

The test262 runner gains an ES2015 subset run, read without and with
the option. docs/mcp.md and docs/target-app-parity.md describe the
new forms.
2026-11-21 20:43:20 -08:00
BFlat db9acab4da Merge pull request #9004 from dotCooCoo/fix/retype-even-odd-turned-counters
Retype: a glyph in an even-odd compound matches with only some of its contours reversed
2026-11-22 11:38:53 +07:00
BFlat 90cd5eef57 Merge pull request #9016 from dotCooCoo/fix/dynamic-symbol-part-selection-paint
Symbols: Direct Selection picks a dynamic instance's part where its fill and stroke effects draw it
2026-11-22 11:38:33 +07:00
BFlat f03d04b91b Merge pull request #8996 from dotCooCoo/fix/simplify-smooth-keep-closed-start
Paths: Object > Path > Simplify and Smooth keep a closed path's start
2026-11-22 11:38:13 +07:00
BFlat 37610608f1 Merge pull request #8976 from dotCooCoo/fix/smooth-region-rejects-bad-params
Smooth: path.smoothRegion and path.joinScrub refuse a radius, fidelity or tolerance out of range
2026-11-22 11:37:54 +07:00
BFlat 1360f9ac6f Merge pull request #8961 from dotCooCoo/fix/safe-mode-expand-hidden-symbol-art
Expand Appearance: Safe Mode skips art that a group's raster image leaves out
2026-11-22 11:37:14 +07:00
BFlat 789f5033bb Merge pull request #8954 from dotCooCoo/fix/params-textedit-rest
Type: text commands refuse a parameter of the wrong type
2026-11-22 11:36:54 +07:00
BFlat 55064f7f59 Merge pull request #8949 from dotCooCoo/feat/dimension-drag-reposition
Dimension tool: a drag from a dimension already drawn moves it
2026-11-22 11:36:34 +07:00
dotCooCoo f9498b1735 Merge main into fix/relink-mask-matching-file-path-docs 2026-11-21 20:27:41 -08:00
dotCooCoo 7e5b421db2 Scripts: UnitValue pixels and percentages use the left object's base
With two UnitValues and a left one in px or %, the right one is now
converted with the left one's baseUnit, so a 1 px value with a 2 pt base
plus 1 in gives 37 px. Conversions keep their intermediate values in
range, so a result that is a finite number no longer fails because a
step on the way overflows or reaches 0.
2026-11-21 20:25:38 -08:00
dotCooCoo 3a9c3a763f Merge main into fix/live-paint-bucket-journal-replay
# Conflicts:
#	crates/engine/src/cmd/library.rs
#	crates/engine/src/cmd/swatchlib.rs
#	crates/engine/src/cmd/xform.rs
2026-11-21 20:12:17 -08:00