Commit Graph
892 Commits
Author SHA1 Message Date
BFlat 050f7cf407 Merge pull request #9019 from dotCooCoo/feat/scripts-api-d1a-app-documents
Scripts: app gives scripts the open documents, their selection and page items
2026-11-26 08:50:54 +07:00
dotCooCoo c3645d265d Merge main into feat/plugin-api-importers-place 2026-11-25 14:26:01 -08:00
dotCooCoo 948ebd6adb Merge main into feat/scripts-api-d1a-app-documents 2026-11-25 10:21:51 -08:00
dotCooCoo 388e1f29ef Merge main into feat/plugin-api-importers-place 2026-11-25 09:46:45 -08:00
dotCooCoo f49734f5ec Docs: SVG round trips keep mm, cm, in and pc; other units keep their printed size 2026-11-25 08:57:54 -08:00
dotCooCoo 2ffccc3e90 SVG export: feet, yards, meters, Q and Ha documents keep their printed size
Since #8610, a document in millimeters, centimeters, inches or picas is
exported with that unit on the root width and height. A document in
feet, feet and inches, yards, meters, Q or Ha still got unitless point
values, which SVG readers take as CSS pixels at 96 per inch, so the art
opened at 75% of its size. These units have no SVG unit identifier, so
the export now writes feet and yards in inches, meters in centimeters,
and Q and Ha in millimeters. The viewBox stays in points, and
VectorCraft reads the file back at the same size.
2026-11-25 06:07:34 -08:00
BFlat 0f7580c97e Merge pull request #8830 from Hassan1305/docs-8312-3d-status
Docs: list first-light 3D shadows and graphics as built (#8312)
2026-11-25 17:45:40 +07:00
dotCooCoo 1f1c8ccf8c Merge main into feat/scripts-api-d1a-app-documents 2026-11-24 20:48:43 -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 c664ce630b Plug-ins: importers whose manifest sets place also read files for File › Place
An importer plug-in with "place": true in its manifest now reads its files
for File › Place as well as File › Open. file.place, file.place.info and
file.place.queue take importer and params; without importer, a file no
built-in format reads goes to the first placing importer by id that lists
its extension. The importer is given at most 128 MiB of the file (a larger
file is refused from its size before it is read) with _context.mode
"place", and its objects, guides left out, become one group named after
the file, as one undo step, embedded. A decline, invalid output, a trap or
Cancel places nothing.

- The Place dialog lists placing importers' extensions under "All
  placeable files" and in a filter named after each importer.
- On the web, a placing importer's file dropped on the canvas is placed.
- A file placed with a named importer skips the text, PDF, DXF and PSD
  import options.
- document.formats and plugin.list mark placing importers with place:
  true; place on any other kind is refused at install.

Docs: docs/plugins.md, docs/mcp.md, docs/gaps.md, docs/target-app-parity.md.
2026-11-22 07:20:07 -08:00
dotCooCoo f70d2ee7e6 Scripts: duplicate, selection and wrapper fixes for the object model
- duplicate() runs Edit > Duplicate, the place and the selection
  restore under one savepoint, so a refused place leaves the documents,
  the selection and the undo history as they were. It reads the copy's
  id from the command's own result, so ids above 2^53 return the copy.
  A path inside a compound path throws an error instead of copying the
  whole compound path.
- An edit restores a mixed selection (direct-selected anchors and whole
  objects) in its original order with one select.anchorsMany.
- Assigning the selection clears a Layers panel target.
- A call on an inactive document switches back even when the selection
  restore fails.
- documents.add with a grid by column passes the row count to file.new,
  which takes a new artboardLayout.rows key: 5 artboards in 4 rows give
  columns of 4 and 1. A preset keeps the rows until columns without
  rows, or another layout, is given, and New Document drops them when
  Columns or the layout changes.
- A held page item stays the same object when its class changes in the
  same family (a placed image that is embedded becomes a RasterItem).
- A waiting class member's answer is read as a class instance, and a
  class constructor called with new cannot wait.

Docs: docs/mcp.md (DocumentPreset, duplicate, file.new rows), docs/gaps.md
(G6).
2026-11-21 08:43:10 -08:00
BFlat f558297963 Merge pull request #8681 from dotCooCoo/feat/retype-near-matches
Retype: near matches within a tolerance, and words outlined as one compound path
2026-11-21 10:38:18 +07:00
HassanKhan b31dd2fea2 Merge remote-tracking branch 'origin/main' into docs-8312-3d-status
# Conflicts:
#	docs/gaps.md
2026-11-20 22:36:30 +05:00
bflatastic baa6e46658 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/gaps.md
#	docs/roadmap.md
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-11-21 00:18:52 +07:00
HassanKhan fece2bdfe4 Merge remote-tracking branch 'origin/main' into docs-8312-3d-status
# Conflicts:
#	docs/gaps.md
2026-11-20 22:15:50 +05:00
HassanKhan 57172c8a58 Merge remote-tracking branch 'origin/main' into docs-8312-3d-status
# Conflicts:
#	docs/gaps.md
2026-11-20 22:06:00 +05:00
bflatastic cc0f98ed6a Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/gaps.md
#	docs/roadmap.md
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-11-20 23:46:03 +07:00
ruchirguitar ae21438d48 G12: add Asset Export tile context menus 2026-11-20 22:15:57 +05:30
ruchirguitar edf4e97959 Text styles panel: add item right-click context menu (Options, Duplicate, Delete, Redefine) (#8745)
* Text styles panel: add item right-click context menu (Options, Duplicate, Delete, Redefine)

* fix(text-styles): require text target for clear overrides and update parity docs
2026-11-20 23:43:35 +07:00
ruchirguitar 0b57d2233b Properties panel: add contextual Quick Actions for text (Create Outlines, Retype, Find and Replace) (#8778)
* Properties panel: add contextual Quick Actions for text (Create Outlines, Retype, Find and Replace)

* Properties panel: address review comments on Retype reveal idempotency, test assertions and parity docs
2026-11-20 23:43:09 +07:00
ruchirguitar 05709aa624 Appearance panel: add row context menu (Duplicate, Delete, Hide/Show, Edit Effect, Clear Appearance) 2026-11-20 21:53:58 +05:30
ruchirguitar eca3bb5d0e Actions panel: add context menu for action sets and actions (Play, Duplicate, Delete, Options, Batch) (#8815) 2026-11-20 23:07:41 +07:00
dotCooCoo 3e4e4e255f Merge main into feat/retype-near-matches 2026-11-20 06:02:09 -08:00
HassanKhan 74efef35c7 docs: drop angular cut caps from the 3D missing lists (#8312)
Revolve's Cap closes a partial sweep's angular cut sides (revolve.md).
2026-11-20 17:05:28 +05:00
HassanKhan 0595f6e8ab docs: list first-light shadows and 3D graphics as built (#8312)
README's What's missing no longer names Extrude & Bevel, Inflate and
Rotate; G3 and the effects-parity 3D summary name what remains: base and
Substance materials and shadows from lights after the first.
2026-11-20 16:50:24 +05:00
dotCooCoo b0de3d983e Merge main into feat/retype-near-matches 2026-11-19 13:59:32 -08:00
bflatastic f0b8980dbe Merge main into #8336
# Conflicts:
#	crates/ui-egui/src/i18n/bg.tsv
#	crates/ui-egui/src/i18n/bs.tsv
#	crates/ui-egui/src/i18n/ca.tsv
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/da.tsv
#	crates/ui-egui/src/i18n/de.tsv
#	crates/ui-egui/src/i18n/el.tsv
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/fi.tsv
#	crates/ui-egui/src/i18n/fr.tsv
#	crates/ui-egui/src/i18n/gu.tsv
#	crates/ui-egui/src/i18n/hi.tsv
#	crates/ui-egui/src/i18n/hu.tsv
#	crates/ui-egui/src/i18n/id.tsv
#	crates/ui-egui/src/i18n/it.tsv
#	crates/ui-egui/src/i18n/ja.tsv
#	crates/ui-egui/src/i18n/ka.tsv
#	crates/ui-egui/src/i18n/ko.tsv
#	crates/ui-egui/src/i18n/nl.tsv
#	crates/ui-egui/src/i18n/pl.tsv
#	crates/ui-egui/src/i18n/pt-br.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/sv.tsv
#	crates/ui-egui/src/i18n/tests.rs
#	crates/ui-egui/src/i18n/tr.tsv
#	crates/ui-egui/src/i18n/uk.tsv
#	crates/ui-egui/src/i18n/vi.tsv
#	crates/ui-egui/src/i18n/zh-hans.tsv
#	crates/ui-egui/src/i18n/zh-hant.tsv
2026-11-20 04:56:34 +07:00
BFlat 36ee745791 Merge pull request #8774 from yoriswind/codex/8655-scissors-cut-preview
Scissors: preview the actual cut point
2026-11-20 04:25:33 +07:00
yoriswind 36bde202eb Scissors: preview the actual cut point
Show the native point marker at the existing cut target, respecting consumer endpoint eligibility/canonicalization and current snapping/selection. Keep cut commands unchanged.

Closes #8655.
2026-11-19 20:00:59 +00:00
bflatastic 81f7884d4d Merge main into #8365
# Conflicts:
#	docs/target-app-parity.md
2026-11-20 02:59:43 +07:00
bflatastic 5a9148de23 Merge main into #8689
# Conflicts:
#	docs/gaps.md
#	docs/target-app-parity.md
2026-11-20 02:53:30 +07:00
bflatastic 8acd638307 Merge main into #8755
# Conflicts:
#	docs/gaps.md
#	docs/roadmap.md
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-11-20 02:47:35 +07:00
dotCooCoo 29695edb0f Merge main into feat/decorative-brush-library 2026-11-19 10:59:13 -08:00
ruchirguitar 4e9d0ca212 Merge origin/main into feat/brushes-item-context-menu 2026-11-20 00:10:41 +05:30
BFlat 701254401e Merge pull request #8712 from ruchirguitar/feat/links-item-context-menu
Links panel: add row context menu (Relink, Go to Link, Edit Original, Show in Folder)
2026-11-20 01:28:47 +07:00
ruchirguitar 83aacb0946 Graphic Styles panel: add item right-click context menu (Options, Duplicate, Delete, Redefine, Break Link) 2026-11-19 23:17:37 +05:30
bflatastic c6c7a6a953 Merge remote-tracking branch 'origin/main' into fix/8336
# Conflicts:
#	crates/ui-egui/src/i18n/bg.tsv
#	crates/ui-egui/src/i18n/bs.tsv
#	crates/ui-egui/src/i18n/ca.tsv
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/da.tsv
#	crates/ui-egui/src/i18n/de.tsv
#	crates/ui-egui/src/i18n/el.tsv
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/fi.tsv
#	crates/ui-egui/src/i18n/fr.tsv
#	crates/ui-egui/src/i18n/gu.tsv
#	crates/ui-egui/src/i18n/hi.tsv
#	crates/ui-egui/src/i18n/hu.tsv
#	crates/ui-egui/src/i18n/id.tsv
#	crates/ui-egui/src/i18n/it.tsv
#	crates/ui-egui/src/i18n/ja.tsv
#	crates/ui-egui/src/i18n/ka.tsv
#	crates/ui-egui/src/i18n/ko.tsv
#	crates/ui-egui/src/i18n/nl.tsv
#	crates/ui-egui/src/i18n/pl.tsv
#	crates/ui-egui/src/i18n/pt-br.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/sv.tsv
#	crates/ui-egui/src/i18n/tests.rs
#	crates/ui-egui/src/i18n/tr.tsv
#	crates/ui-egui/src/i18n/uk.tsv
#	crates/ui-egui/src/i18n/vi.tsv
#	crates/ui-egui/src/i18n/zh-hans.tsv
#	crates/ui-egui/src/i18n/zh-hant.tsv
#	docs/gaps.md
2026-11-20 00:42:52 +07:00
bflatastic 8157194da2 Merge remote-tracking branch 'origin/main' into fix/8585 2026-11-19 23:23:53 +07:00
dotCooCoo 7179a7ebe2 Merge main into feat/decorative-brush-library 2026-11-19 07:42:27 -08:00
ruchirguitar beffa106d9 Merge origin/main into feat/links-item-context-menu 2026-11-19 20:53:36 +05:30
ruchirguitar b56929503d Merge origin/main into feat/brushes-item-context-menu 2026-11-19 20:45:22 +05:30
dotCooCoo 4a7f523080 Merge main into feat/nature-icons-symbol-library 2026-11-19 05:51:21 -08:00
ruchirguitar d386d3280f Links panel: add row context menu (Relink, Go to Link, Edit Original, Show in Folder) 2026-11-19 18:59:17 +05:30
dotCooCoo 056059d8cb Merge main into feat/direct-select-mirror-handles 2026-11-19 05:18:05 -08:00
dotCooCoo 51ab54ac2b Merge main into feat/decorative-brush-library 2026-11-19 05:15:47 -08:00
dotCooCoo 3e0963814f Merge main into feat/engraving-brush-library 2026-11-19 05:06:49 -08:00
ruchirguitar b5ce3a88af Brushes panel: add item right-click context menu (Brush Options, Duplicate, Delete) 2026-11-19 15:14:34 +05:30
dotCooCoo 67fa32374d Retype: near matches within a tolerance, and words outlined as one compound path
type.retype takes a tolerance (0 to 0.05, default 0 for exact matches
only). Above 0, a shape of up to 8 contours that is no glyph exactly is
read at equal steps of length from any start and in either direction,
with its contours paired with the glyph's by length. It becomes the
closest glyph when the leftover distance, relative to the shape's size,
is at most the tolerance, and the glyph's outline and the shape's each
lie within three times the tolerance of the other. Simplified outlines,
curves split in two and contours in another order or direction match
this way. A near-matched glyph may differ from its line by the tolerance
in size, turn and place; an exact glyph keeps the exact limits unless
the line's first glyph is a near match. Each entry of fonts in the
result has a score from 1 (exact) to 0.

A compound path holding several glyphs (a word made into one compound
path) is split into groups of contours, a contour with the contours
inside it, and matched in runs of up to three groups, longest first
among those that leave the rest matchable, so an i's stem and dot
become one i. Exact matches of the whole shape come first, then exact
matches of its groups, then near matches. The compound becomes type
only when every glyph matches; otherwise it stays and is reported once.
Exact matching of those groups also reads contours that run the other
way round, as Make Compound Path leaves them. A compound path of more
than 256 groups or 512 contours is matched whole only, and so are the
shapes after the first 16,384 contours one command groups.

Near matching compares a shape with at most 256 glyphs, in at most 50
million point comparisons per shape and 2 billion per command, and
looks glyphs up for at most 1,024 distinct shapes and runs per command,
whole shapes first. At most 262,144 glyphs are drawn to check and
32,768 indexed for near matching, shared equally among the faces; a
face's glyphs closest to the selected shapes are indexed first.

The tolerance, the score and the splitting rules are VectorCraft's own.

Part of #4934
2026-11-19 00:47:08 -08:00
bflatastic 69f4559744 Merge main into #8652
# Conflicts:
#	docs/gaps.md
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-11-19 15:36:41 +07:00
bflatastic 615bc1e0d3 Merge main into #7373
# Conflicts:
#	docs/gaps.md
#	docs/roadmap.md
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-11-19 15:34:18 +07:00