1392 Commits
Author SHA1 Message Date
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
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 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
BFlat 0882bd3850 Merge pull request #8970 from dotCooCoo/fix/image-quad-malformed-corner
Native file: a distorted image with a malformed saved corner opens placed by its transform
2026-11-22 10:50:58 +07:00
BFlat 27c59e3125 Merge pull request #8941 from dotCooCoo/fix/symbol-art-ignores-layer-preview
Gradient: freeform Lines mode counts a symbol's stroke on a Preview-off layer of its art
2026-11-22 10:47:12 +07:00
BFlat a6fb037085 Merge pull request #8920 from dotCooCoo/feat/draw-behind-alt-drag-copy
Selection: an Alt-drag copy in Draw Behind goes directly below its original
2026-11-22 10:44:50 +07:00
Dylan M. Taylor f72c56711a doc: share PNG pHYs chunk writing via craft-image-codecs (craft-libs#785) (#9033) 2026-11-21 14:16:05 -05:00
Terra854 869105e128 Images: read BMP density through craft-image-codecs (#9028) 2026-11-21 13:28:30 -05:00
dotCooCoo d54cbce778 Symbols: a part's outline leaves out hidden art of instances nested in it
The outline of a dynamic instance's part walked the art of an instance
nested in the part, drawn with that instance's fill and stroke effects,
and outlined its hidden objects as well. It now skips a hidden object and
what it holds, as the part pick does.
2026-11-21 04:52:00 -08:00
dotCooCoo 05d5befece Symbols: Direct Selection follows a nested instance of a clip group moved by the instance's fill effects
A symbol instance nested in a dynamic symbol's art was picked and outlined
where its art is drawn only when the shapes its fill and stroke paint were
non-empty. Those shapes leave out clip groups and type, so a nested
instance whose art is a clip group was picked at its plain place although
the canvas draws its members moved by the outer instance's fill or stroke
effects.

The test is now whether the nested instance's active fill or stroke has a
visible geometry effect, which the engine registers with
set_instance_reshapes. Picks and outlines no longer evaluate those shapes
for each nested instance they visit.
2026-11-21 04:09:01 -08:00
dotCooCoo b06bccfaeb Symbols: picking and outlining a dynamic instance's part stays within one object limit
Outlining a part of a dynamic symbol's instance expanded every nested
instance whose fill or stroke effects reshape its art, at every level, with
no limit, so art that nests many such instances a few levels deep took work
that grew with each level. A part pick charged each object it tested but
copied each nested instance's art before charging anything for it.

The part outline now shares the object limit a click has, and each object
it outlines takes one object of it. The art of a nested instance takes its
size from the limit before it is copied, and the art an object's own
effects draw takes its size once evaluated; nothing more is copied or
evaluated once the limit is used up. The art of the instance itself is
charged by its walk, as before.
2026-11-21 03:30:44 -08:00
dotCooCoo d8db9eda83 Symbols: Direct Selection picks a dynamic instance's part where its fill and stroke effects draw it
A geometry effect on a dynamic symbol instance's fill or stroke moves or
reshapes the art the canvas draws, and a click there already selects the
instance. Direct Selection still picked a part of the art at its plain
shape and outlined that shape, so a click on the drawn result picked
nothing and a click where the part no longer paints picked it.

symbol_part_at and symbol_part_outline_in_view now test and outline the
instance's art with the effects of its active fill and stroke added, as
the canvas adds them. Live objects in the art keep their place, so the
child-index path still leads to the part. A nested instance is picked
and outlined where its reshaped art is drawn, type with a fill or stroke
of its own where its reshaped glyphs are drawn (Type Object Selection by
Path Only still takes the type path), and an image's outline includes
the shapes its own fills and strokes paint. A clipping path is still
picked and outlined by its own geometry. Outline view and layers with
Preview off keep the plain shapes; blends, envelopes and repeats in the
art are picked without the instance's effects.
2026-11-21 02:42:10 -08:00
dotCooCoo 525dea58f0 Native file: a distorted image with a malformed saved corner opens placed by its transform
A native file whose `image_quad` held an entry that was not a point among
its first four failed to open: `image_corners` read each entry as a
`Point` and returned the error. Such corners, and an `image_quad` that is
not a list, are now dropped as the file is read, and the image opens
placed by its transform, as a list of other than four points already did.
A point is `[x, y]` or `{"x": x, "y": y}`; values that are not taken are
skipped without being kept in memory.

Follows #8392.
2026-11-20 22:40:02 -08:00
dotCooCoo e70ec2f136 Gradient: freeform Lines mode counts a symbol's stroke on a Preview-off layer of its art
The walk of a symbol instance's art switched to outline for a layer of
the art whose Preview is off without checking ignore_layer_preview, so
with the option set a press on the art's stroke past the instance's box
missed. FindPart::find now checks the option, as the other point hit
paths do.
2026-11-20 21:03:22 -08:00
dotCooCoo 1be942d7fc Dimension tool: a drag from a dimension already drawn moves it
With no points or lines picked, a press within 8 pixels of what a
visible, unlocked dimension draws (its lines, arrowheads and label),
where it is the topmost object that can be edited, followed by a drag
moves that dimension as one undo step. A segment of the art as near
the press as the dimension's lines and label, or nearer, takes the
press instead, and a click there without a drag still picks a point.
The part grabbed follows the pointer: a linear dimension's line moves
as far across as the pointer moves, an angular arc moves as far as the
pointer moves away from or toward the vertex, and a radius or diameter
line turns about the center as the pointer turns, or toward the
pointer when grabbed at the center. The dimension keeps what it
measures and its link to the art. With Smart Guides on, a linear
dimension's line lands on the level of a parallel dimension line, as
when it is placed, and of two lines on one level the one nearer the
pointer along it wins. Isolation mode, clipping masks and locked artboards
apply as they do to a click; with a part of a dimension isolated, the
dimension is not dragged. A dimension that a geometry effect on it, on
one of its parts or on a group around it draws elsewhere is not
dragged, except in Outline view and on a layer whose Preview is off.

dimension.update takes `at: [x,y]`, which puts a linear dimension's
line through the point, gives an angular arc a radius of the point's
distance from the vertex (at least 12 pt), or turns a radius or
diameter line toward it. With Real-time Drawing off, a dimension.update
preview that names its dimensions outlines only those dimensions.

A dimension pasted into a document that had none now marks the
document as holding dimensions (Document::insert), so the Dimension
tool drags it like one drawn there and edits refresh it. Opening a
native file sets the flag from the objects it holds, which covers files
saved after such a paste.

Docs: docs/dimensions.md, docs/target-app-parity.md.
2026-11-20 20:44:44 -08:00
dotCooCoo 9eb8cd6146 Merge main into feat/draw-behind-alt-drag-copy 2026-11-20 20:07:57 -08:00
BFlat 4ce43b1091 Merge pull request #8532 from dotCooCoo/feat/distorted-image-commands
Links: Relink, Embed and Unembed keep a distorted image's corners
2026-11-21 11:01:53 +07:00
BFlat 9078e13d78 Merge pull request #8867 from dotCooCoo/perf/selection-widgets-kind-first
Selection: on-canvas widgets check an object's kind before its editability
2026-11-21 10:56:16 +07:00
dotCooCoo 318d1ed6e2 Selection: an Alt-drag copy in Draw Behind goes directly below its original
In Draw Behind, an Alt-drag of whole objects with the Selection or Direct
Selection tool now puts each copy directly below its own original, in the
original's group or layer, and selects the copies, as the drawing modes help
page lists duplicating by Alt-drag among the actions Draw Behind applies to
(https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/learn-drawing-basics/drawing-modes-overview.html).
The copy of a clip group's or clipping layer's clipping path goes directly
above it, so the clipping path stays the bottom object.

- object.transform takes drawBehind (with copy); the tools send it while Alt
  is held. A value that is not true or false is refused.
- Draw Normal, Draw Inside, object.move, the transform dialogs' Copy,
  Duplicate and Transform Again keep putting copies above.
- Document::insert_below puts nodes directly below their anchors in one pass.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-20 19:19:13 -08:00
dotCooCoo e2d62de4fe Merge main into feat/distorted-image-commands 2026-11-20 18:54:01 -08:00
dotCooCoo 873a5562a7 Gradient: a freeform line stays open over its object's stroke on a layer with Preview off
The check for whether the pointer is still on the object hit the object's
painted art with outline off, but the hit test turned outline back on for
a layer with Preview off, so a move onto the stroke past the fill ended
the line. A new HitOptions field, ignore_layer_preview, keeps the point
hit tests from switching to outline for such layers, and the freeform
check sets it. the_stroke_counts_as_the_object now runs with the layer's
Preview on and off.
2026-11-20 17:07:31 -08:00
dotCooCoo 125ab66348 Selection: on-canvas widgets check an object's kind before its editability
The type, pie, side count and corner widgets, the Objects on Path, Mirror,
Grid and Radial Repeat controls, the Image Trace Split divider and the
center point now check that a selected object is of a kind that has the
widget before asking whether it is editable. With an artboard locked, the
editability check measures the art of the layer object holding the object,
so a large selected group of another kind was measured on every repaint and
pointer move. The widgets shown are the same.

A test-only counter (vectorcraft-doc feature locked-artboard-count) counts
those measurements; widget_order_tests checks that objects of other kinds
are not measured, compares every widget with the editability-first result
on a mixed document, and holds an ignored timing test, widget_order_perf.
2026-11-20 15:03:29 -08:00
Dylan M. Taylor 063f550802 doc: share CMYK TIFF read and write (#8751)
* doc: share CMYK TIFF read and write

* doc: fix craft_image_codecs encode/Image/Truncated calls and fmt

* cmyk: decode TIFF samples from the metadata directory

* doc: guard TIFF metadata tag sizes before decoding CMYK source

* doc: fix TIFF metadata preflight scan bound and repin craft-libs

* test(doc): distinguish shared craft-image-codecs CMYK TIFF read/write

* test(doc): pass written.bytes.as_slice() to Cursor

* chore: restore origin/main craft-libs pin (d7c9632bfb)
2026-11-20 12:45:50 -05:00
bflatastic e1aa78590a Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/target-app-parity.md
2026-11-20 23:41:24 +07:00
dotCooCoo 3f8e4b1fdc Merge main into feat/distorted-image-commands 2026-11-19 16:54:09 -08:00
Dylan M. Taylor b8c15be445 Merge remote-tracking branch 'origin/main' into cutover/jpeg-icc-replace
# Conflicts:
#	Cargo.toml
2026-11-19 16:47:43 -05:00
BFlat 67c9c0ef35 Merge pull request #8761 from dotCooCoo/feat/retype-area-text
Retype: stacked lines become one area type object
2026-11-20 04:42:23 +07:00
dotCooCoo 1800ca6949 Retype: a pair of lines' glyphs takes the tracking of the lines around it, and a wrap object below all area type makes no outline
A leading of exactly a quarter of the size joins lines.
2026-11-19 12:33:02 -08:00
datatimp 50be36392d Merge remote-tracking branch 'upstream/main' into fix/8639-target-circle-modifiers
# Conflicts:
#	docs/target-app-parity.md
2026-11-19 14:53:35 -05:00
dotCooCoo 70a36623ad Merge main into feat/distorted-image-commands 2026-11-19 11:17:21 -08:00
BFlat 9d334e90ea Merge pull request #8392 from dotCooCoo/feat/distort-images
Free Transform: Perspective Distort and Free Distort put an image's corners on the handles
2026-11-20 02:02:42 +07:00
BFlat 06ba6108ca Merge pull request #8732 from storytold/train/carry7739
Symbols: the Symbol Shifter, Sizer, Stainer and Styler take Shift (#7739)
2026-11-20 01:40:08 +07:00
dotCooCoo cdcaab9301 Retype: stacked lines become one area type object
Part of #4934. type.retype set each line of outlined text as its own
point type object, even when the lines stack as one paragraph.

- Opaque, Normal lines with a solid fill or none and no stroke that
  follow each other in paint order, with the same group, paint, font,
  size, turn and tracking, each the same leading (0.25 to 3 times the
  size) below the one before and lined up at their starts, ends or
  centers, become one area type object. Its leading is Auto when Auto
  puts the last baseline in place, else the mean distance between the
  baselines, and its alignment is left, right or center. Its frame is
  Convert To Area Type's, now shared through typemenu::point_to_area.
  An untracked line of one or two glyphs takes the others' tracking.
- Every object is laid out and compared with the outlines first: when
  area type would move a glyph the lines stay multi-line point type.
  When that also moves a glyph, the block ends at that glyph's line and
  the lines after it join again. Type whose bounds would reach past the
  coordinate limit stays apart.
- Text Wrap objects above new area type are taken into account; when
  checking them on the changed layers would copy more than 2,000,000
  anchors, subpaths and shapes, the lines stay multi-line point type.
  text::wrap_copy_units counts that work without copying the outlines,
  and wrap_work no longer copies them to count.
- The result's fonts entries add leading and area, and texts join an
  object's lines with line breaks.

These rules are VectorCraft's own. Docs: docs/mcp.md (Retype several
lines), docs/type-parity.md (Retype row), docs/target-app-parity.md,
docs/roadmap.md (M7 row).
2026-11-19 10:22:49 -08:00
bflatastic 8157194da2 Merge remote-tracking branch 'origin/main' into fix/8585 2026-11-19 23:23:53 +07:00
Dylan M. Taylor 05fffe3020 doc: delegate JPEG ICC replacement to craft-image-codecs 2026-11-19 11:00:14 -05:00
bflatastic 41e1b41603 Merge remote-tracking branch 'origin/main' into fix/7739 2026-11-19 22:53:32 +07:00
dotCooCoo f8a5534abb Merge main into feat/distorted-image-commands 2026-11-19 07:42:56 -08:00
dotCooCoo 82ef5176bc Merge main into feat/distort-images 2026-11-19 06:39:02 -08:00
dotCooCoo 55438151f3 Merge main into feat/distort-images 2026-11-19 06:08:29 -08:00
BFlat 6b7ad6cf55 Merge pull request #8605 from dotCooCoo/feat/dimension-stroke-arrowheads
Dimension: Arrow Style offers every built-in stroke arrowhead
2026-11-19 21:07:19 +07:00
dotCooCoo b20c22500a Merge main into feat/symbolism-shift-gestures 2026-11-19 06:05:13 -08:00
datatimp 04f818823e Merge remote-tracking branch 'upstream/main' into fix/8639-target-circle-modifiers
# Conflicts:
#	crates/ui-egui/src/panels/layers.rs
#	crates/ui-egui/src/panels/layers/tests.rs
#	docs/target-app-parity.md
2026-11-19 08:48:56 -05:00
BFlat 778b95918d Merge pull request #8460 from dotCooCoo/feat/transform-rect-ellipse-angle
Transform: Rectangle and Ellipse Properties show the shape's angle
2026-11-19 20:44:43 +07:00
dotCooCoo 056059d8cb Merge main into feat/direct-select-mirror-handles 2026-11-19 05:18:05 -08:00
dotCooCoo d084e90cba Merge main into feat/dimension-stroke-arrowheads 2026-11-19 04:54:39 -08:00
dotCooCoo 173d72a867 Merge main into feat/distorted-image-commands 2026-11-19 04:49:23 -08:00
dotCooCoo b0bebd324d Merge main into feat/transform-rect-ellipse-angle 2026-11-19 04:42:52 -08:00
Sven Lafebre 4c20c3e21f Merge remote-tracking branch 'origin/main' into fix/8188-ai-arrowheads
# Conflicts:
#	crates/engine/src/cmd/stroke.rs
#	crates/eps/src/import/ai/read/ops.rs
#	docs/file-format-parity.md
2026-11-19 12:34:27 +01:00
BFlat 74591771b5 Merge pull request #7626 from jayzed80/fix/area-type-hit-7274
Selection: clicks in the empty part of an area type frame reach the art behind it (#7274)
2026-11-19 15:20:20 +07:00
bflatastic 497af8e79b Merge main into #8341
# 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/da.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/id.tsv
#	crates/ui-egui/src/i18n/ka.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/sv.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-19 15:03:22 +07:00