Commit Graph
12259 Commits
Author SHA1 Message Date
dotCooCoo 511ecdb6d3 Merge main into fix/read-roots-document-replies 2026-11-12 05:53:13 -08:00
dotCooCoo ac79ae55ba 3D and Materials: Expand as Wireframes keeps a layer's ruler guides and reshapes each face
- Expanding a layer removed its ruler guides with its members. The guides
  of the layer and of its sublayers now stay on the layer, after the edges.
- Geometry effects after a 3D effect reshaped all the faces as one path, so
  Offset Path merged faces that touch. Each effect now reshapes each face on
  its own, about the bounds of all the faces, within one shared budget of
  anchors, as it reshapes the drawn surface.

Docs: docs/mcp.md.
2026-11-12 05:52:39 -08:00
Taha-Mahmoodi ebad5d75c0 Use the unencoded fixture glyph in ligature range regression 2026-11-12 18:21:43 +04:30
dotCooCoo ba23477b23 Merge main into feat/brushes-ink-wash-library 2026-11-12 05:50:48 -08:00
dotCooCoo 8187f7ae00 Images: a CMYK JPEG turned by its EXIF orientation keeps its inks
A four-component JPEG whose EXIF orientation turns or flips it went
through the image decoder, which reads CMYK JPEGs as RGB, and was
stored as an RGB PNG without its inks. It is now stored the way a
turned CMYK TIFF is: its inks, 8 bits each, turned and written as a
CMYK TIFF with the turned resolution.

- vectorcraft_doc::cmyk::turned_cmyk turns the inks of a CMYK JPEG or
  TIFF, next to stored_cmyk_tiff; tiff_inks is private again.
- raster_image swaps the resolution axes inline, as its HEIF branch
  does.
- The links comment and the docs/target-app-parity.md line on EXIF
  orientation now describe the turned CMYK TIFF.
2026-11-12 05:45:26 -08:00
dotCooCoo 971c878402 Export for Screens: an export into a preset's folder runs in the background
With Background Export on, an Export for Screens call that gives only an
`exportPreset` whose preset keeps a folder ran at once on the UI thread,
because the background route looked at the call's own `folder` only. It
now takes the preset's folder as well and writes in the background with
the progress dialog and Cancel, as an export into a folder it names.

When that folder is outside an MCP client's read roots, the prepared
export carries the folder's shown name, so the reply written later lists
the files relative to the folder with no ZIP `path`, a refused write names
the folder by its name, and the status bar does the same, as for an
export made at once.

The status of a preset-only export made at once named an empty folder
("Exported 1 file to "); it now names the preset's folder.

- `Session::screen_export_folder` returns the folder an export writes
  into and its shown name when the reply leaves it out.
- `ScreenExport::write` applies the read-root rule decided when the
  export was prepared.
- docs/mcp.md and docs/target-app-parity.md describe the change.
2026-11-12 05:44:29 -08:00
dotCooCoo 909f0ff301 SVG import: the path a text follows counts toward the <use> text limit
A text on a path that many <use> elements show was laid out along the
whole path once per <use>, and the path was found in the file and parsed
again each time, while the 1 MiB limit on texts built for <use> elements
counted only the text's nodes and characters. A file with a short text on
a very long path and many <use> elements of it could keep the importer
busy far past that limit.

- The elements of the path a <textPath> follows now count toward the
  limit. Past it, the remaining <use> elements show the text with its own
  properties, and the warning names text paths as well as text.
- The path of each <textPath> is found and parsed once and shared by
  every <use> that shows its text.

Files within the limit import as before.
2026-11-12 05:43:42 -08:00
dotCooCoo 97eecdb21e Stroke: a group used as a clipping path adds nothing to a custom arrowhead
A custom arrowhead takes a clipping path's own fills and strokes only where the clipping path paints them on the canvas. A group used as the clipping path paints nothing, so its members' fills no longer widen the head past the clipped art.
2026-11-12 05:37:07 -08:00
dotCooCoo 6ccb7c9077 3D and Materials: Expand as Wireframes expands Revolve (Classic) and Rotate (Classic)
effect.expandAsWireframes returned "draws no faces" for an object with
Revolve (Classic). It now takes the faces of Revolve (Classic) with that
effect's own options, and Rotate (Classic) is expanded as Rotate is: every
fill and stroke turned as one plane.

Docs: docs/mcp.md, docs/three-d.md.
2026-11-12 05:36:03 -08:00
dotCooCoo 01ccb1d8ca Merge main into feat/3d-expand-as-wireframes 2026-11-12 05:35:05 -08:00
dotCooCoo 0b22997201 Docs: the Dynamic Text entries in docs/mcp.md name point type
The Dynamic Text: Block entry says the Contextual Task Bar offers the
item for point type too, and that turning it on makes point type area
type with Block on. The Dynamic Text entry no longer says point type in
the selection is left as it is.
2026-11-12 05:33:38 -08:00
dotCooCoo f317aefa44 Tests: the file-dialog menu test reruns while fonts or plug-ins change
`the_menu_bar_is_inert_while_a_file_dialog_is_open` excused a missing
menu row when the composite font or plug-in it named was gone at the
time of the check. A test running alongside can remove such a font and
define it again between the menu read and the check, and the test then
failed. It now runs inside `undisturbed`, as the file's other tests that
compare menu reads do. When the shortcut, plug-in or font generation
changes during a run, the test runs again on a new app. Every row from
before the dialog must then be back as it was.
2026-11-12 05:32:35 -08:00
dotCooCoo 1db5b2ce53 i18n: plug-in host errors are translated in every complete catalog
The plug-in host's manifest, module and run errors, the errors about an
importer's, exporter's or effect's output and the approval error had no
@msg row in most complete-message catalogs, and the reasons its error
helpers put inside them (bad(), wrong(), out_err(), in_range(), unit(),
read_packed()) were never scanned, so the status bar showed them in
English or mixed two languages.

- Every complete-message catalog gets the rows in a "Plug-in host
  messages" section, and the Hindi rows for these messages are fixed.
- The message scan reads the plug-in host's error helpers, and
  objects.rs writes its two duplicate-id errors as whole strings.
- message() leaves a captured JSON object or array as written.
- Templates that start with text match before templates that start
  with a placeholder, so a wrapping message uses its own row.
2026-11-12 05:32:03 -08:00
dotCooCoo 6e9ffa92cc Merge main into feat/brushes-dry-media-library 2026-11-12 05:31:21 -08:00
dotCooCoo c847acdf23 Palette: a pick opens the dialog its menu item opens
A pick in Search Commands ran its command with no params, while the
menu bar item gives the command params and opens a dialog for them.
Clean Up, Create Gradient Mesh, Smart Punctuation, Release Type on a
Path and Deep Ungroup ran at once with their default values, Find and
Replace reported "missing `find`", and Print Ink Fixes reported that it
needs a value. A pick now runs what a click on the menu item runs, so
these open their dialogs and nothing changes until the dialog is
confirmed.

While the menu item is dimmed (Remove Background or Object Mosaic with
no image selected, Find and Replace with no document open), a pick and
a shortcut open no dialog, and the status line says why the command
can't run. Before this, a shortcut of such a command opened its dialog,
and confirming it failed. Both routes use one helper,
shortcut_editor::menu_target_now.

The menu items that helper reads are read once. Items that list an
installed plug-in (File › Open With importers, Object › Plug-ins
filters) are now left out of them, so a plug-in installed or removed
later does not leave an item there that the menu no longer shows.
2026-11-12 05:29:38 -08:00
Ahmed Gomaa 421fead32b Merge upstream main into file/save-read-only-offers-save-as 2026-11-12 15:24:23 +02:00
dotCooCoo 1bf09bf72e SVG import: a <use> of a text passes its text properties on to the text
The element a <use> shows inherits from the <use> rather than from where it
is defined (SVG 2, https://www.w3.org/TR/SVG2/struct.html#UseElement). A
text shown by a <use> now takes the font, size, weight, fill, stroke and
other text properties the <use> or its parents set, in clip paths too,
while the text's own properties still win. Uses with the same parent and
properties share one text. A <use> inside the text it shows is ignored for
inheritance, and texts built for <use> elements stop at 1 MiB of text with
a warning.
2026-11-12 05:24:22 -08:00
dotCooCoo c9c5d83771 Scripts: a named engine keeps no source map for a run whose script does not compile
A run whose script fails to compile defines no code, so its source map
is not kept and the places of earlier runs stay within the engine's
budget. docs/mcp.md and the progress line say so, and the progress line
names the errors that are reported without a line and column.
2026-11-12 05:18:07 -08:00
dotCooCoo 0779da299b Image Tools: Color Mask hides chosen colors of an image while its pixels stay
Object › Plug-ins › Image Tools gains Color Mask… (`addon.image.colorMask`),
Remove Color Mask and Apply Color Mask. Color Mask hides colors of the
selected images without changing their pixels. It matches colors as Remove
Background does: the edge color, the corner color or picked colors, with
Contiguous, Match, Tolerance and Softness. The mask is kept with the image
object and saved with the document: its settings, and a PNG of the image's
pixels with the hidden colors made clear, at the source's depth with its
color profile and resolution. It is a VectorCraft addition.

- The canvas (clip groups and white-shape opacity masks included),
  printing and separations, PDF (soft masks of CMYK images included), SVG,
  EPS, the raster formats, the legacy .ai and .ai editing data, EMF/WMF,
  DXF and the flattener draw the masked pixels. A linked image stays
  linked, and an output that would refer to its file writes the masked
  pixels instead.
- Copy and paste, placing a document and placed documents carry the masked
  pixels with the image, under the names they are given there.
- The dialog opens on the selected image's mask settings, with a Preview.
  Without settings, the command returns them and changes nothing.
- Setting, removing and applying a mask are each one undo step, and no
  step is added when nothing changes. Apply makes the masked pixels the
  image's own and embeds a linked image. A mask that hides nothing is only
  taken off, and the image keeps its pixels and its link.
- When an image's own pixels are replaced (Update Link, Relink, Crop
  Image, a recolor, a linked file read again on open), its mask is made
  again for the new pixels, in every art tree and in opacity-mask art.
  Crop Image cuts the image's own pixels. When the new pixels can't be
  masked, the mask keeps its settings and hides nothing.
- Objects in `ids` that are not images, CMYK images, linked images that
  show their preview, images past the decode allowance, masks that would
  hide every pixel, and grayscale images colorized with a process color
  are refused. The Eyedropper, Object Mosaic, Create Gradient Mesh, Crop
  Image's trim and Image Trace read the image's own pixels.
- An image is selected by a click anywhere in its frame, as before.

Remove Background now also refuses a grayscale image colorized with a
process color. Its result has an alpha channel, and a process color is
refused on a grayscale image with transparency.

Docs: docs/mcp.md (Image Tools add-on › Color Mask),
docs/target-app-parity.md.
2026-11-12 05:17:01 -08:00
dotCooCoo 88841aa803 Window menu: a panel's entry shows the panel Tab hid instead of closing it
The Window menu checked a panel whenever it was in front in the layout,
even while Tab, Shift+Tab or Presentation Mode hid every panel, so
choosing it, or pressing its function key, closed the panel it was
meant to show.

- A new panel_docking::visible adds the dock and Presentation Mode to
  showing. The Window menu's check marks and the toggle use it, and
  window.panel puts a flyout or floating panel away only while it can
  be seen. With the dock hidden, the dock shows again with the panel in
  its earlier place; the toolbar and the Control bar stay as they are.
- In Presentation Mode window.panel fails with "panels can't be shown
  in Presentation Mode" and changes nothing.
- reveal_panel, the Gradient and Magic Wand tool double-click, the
  Character field shortcuts and the Corner and Shared Edge Merge tool
  items show a panel the dock hid instead of reporting it open or
  closing a floating Anchor Inspector.

Docs: window.panel params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-12 05:16:43 -08:00
Taha-Mahmoodi 0014d19257 Merge remote-tracking branch 'origin/main' into fix/macos-tmp-symlink-tests
# Conflicts:
#	docs/development.md
2026-11-12 17:45:37 +04:30
Taha-Mahmoodi 2585d819cd Merge remote-tracking branch 'origin/main' into feat/glyph-alternates
# Conflicts:
#	docs/gaps.md
#	docs/target-app-parity.md
2026-11-12 17:42:44 +04:30
dotCooCoo 6849bd5422 Docs: docs/plugins.md paragraphs wrap at the file's width
Rewrap the prose in docs/plugins.md whose lines broke well short of
the file's 120-column width or ran past it, including the Safe Mode
sentence, the permission-name and install-confirmation sentences, and
the grants.json paragraph. Each rewrapped line is at most 120 columns.
No words, punctuation, code blocks or tables change.
2026-11-12 05:12:10 -08:00
dotCooCoo b9b1a1e967 Effects: linked opacity masks follow group effects, Free Distort and envelopes
A linked opacity mask moves with the art it masks, and an unlinked one
stays in place. Geometry effects on a group or layer reshaped its
members but left their linked masks where they were, Free Distort left
a linked mask behind, and an envelope bent unlinked masks too.

- Geometry effects on a group or layer run over the art of the linked
  masks of the paths, compound paths and groups inside it, nested and
  inverted masks included. Each Transform copy of a masked path carries
  its own mask, and an image or symbol instance moved by a Transform
  effect carries its linked mask. The effects on an object do not move
  that object's own mask.
- When a mask can't take an effect as the art it masks does (a path in
  either would pass the geometry budget, or the mask would get fewer
  Transform copies), the art and its masks keep their shape under that
  effect. Mask art counts toward the budget.
- Free Distort (`object.distort`) warps a linked mask with its object;
  the params text says so.
- An envelope bends only a linked mask.

Docs: a line in docs/target-app-parity.md.
2026-11-12 05:12:05 -08:00
dotCooCoo 366d09d285 Save As: a save goes ahead when the portal answers with a file type of another shape
The save dialog read the portal's current_filter with zvariant's tuple
conversion, which panics on a structure with fewer fields than the
tuple. On Linux and the BSDs the dialog's thread then ended after the
user picked a file, and nothing was saved. The label is now read only
from a (sa(us)) structure, the shape the FileChooser portal defines.
An answer of another shape keeps the path and names no file type, as
an answer without current_filter does. A structure with more fields
than (sa(us)) also no longer names a file type.
2026-11-12 05:09:40 -08:00
dotCooCoo 438a39fdf4 Render: blend steps' drop shadows draw under an opacity mask with Clip off
An object with an opacity mask draws offscreen over the bounds the
renderer gives it. For a live object (a blend, envelope or repeat) those
bounds took in effects in symbol art and brush art inside it, but not a
path's own effects, so with Clip off the drop shadows of a blend's steps
were cut off at the steps' bounds and did not draw where the mask art
leaves them uncovered. The bounds now also take in how far each path's
own effects paint past it.
2026-11-12 05:09:18 -08:00
BFlat 89fba4ebfd Merge pull request #5446 from Taha-Mahmoodi/fix/import-document-title
Fix #3626: an imported document takes the title the file carries
2026-11-12 20:09:15 +07:00
dotCooCoo 6129853555 Effects: a Transform effect transforms the raster effects listed before it
Effects apply in the order they are listed, so a Drop Shadow, glow, blur,
Feather or pixel filter listed before a Transform effect paints art that
the Transform effect then transforms. VectorCraft drew such an
effect at its own distances around the transformed art: a square scaled
to 200% kept a 10 pt shadow offset. Now the effect follows the Transform
effects after it, with Scale Strokes & Effects on or off: its sizes scale
by the mean scale, and a Drop Shadow's offset turns, reflects and scales
with the art. Effects listed after the Transform effect keep their values,
and Transform Objects off changes nothing.

- raster_effects reads each raster effect through the Transform effects
  after it, so the canvas, export and the redraw region use the followed
  values.
- Where the geometry effects are applied and removed (Expand Appearance,
  baking for export, evaluated groups), the raster effects that remain
  carry the same transformation, hidden ones included.
- A Transform effect that makes copies or moves at random leaves the
  raster effects before it as they are. Rasterize and SVG filters keep
  their options.

Docs: the Transform effect's params text, docs/target-app-parity.md.
2026-11-12 05:07:12 -08:00
dotCooCoo 1996a6df52 Merge main into feat/objects-on-path-select-move-detach 2026-11-12 05:07:11 -08:00
dotCooCoo a1cbb852b3 Objects on Path: a Select/Move drag takes the place nearest the pointer on a path that turns back
The drag chose its place from the point of the path nearest the pointer, but counted each point as
farther by half its distance along the path from the last one. On an open path that turns back on
itself, the object then stayed at its place while the pointer was over another object's ring 10 pt
away. The drag now uses the point nearest the pointer. Where the path passes as near the pointer
more than once, as where it runs back over itself, the drag follows the part nearest along the path
to where it was.
2026-11-12 05:06:00 -08:00
dotCooCoo 842f1f1b68 EPS import: CIDFonts only named, over a predefined CJK CMap, set their characters as live type
Type in a font found by name with a predefined non-Unicode CMap, such as
`/Ryumin-Light-83pv-RKSJ-H findfont` or a `composefont` with `GBK-EUC-H`,
opened as Latin-1 letters (`ú{A` for 日本A) in a font whose style carried
the CMap name (`Light-83pv-RKSJ-H`). Only Unicode CMaps were split off the
font name, and `composefont` failed with `undefinedresource` for the others.

- The predefined CMap decoder used by legacy `.ai` type moves to
  `import/predefined_cmap.rs`, and EPS import decodes these CMaps' codes
  with it (Shift-JIS, EUC, GBK, Big Five, UHC and the other public CMaps).
- A font name splits at a predefined CMap unless an installed face has
  the whole name. A CMap that can't be read gives a warning.
- Type over a vertical CMap (`-V`) is set as vertical type, and each code
  moves the point one em down the column, the default `DW2`
  displacement.
- Every show operator sets decoded type with the same spacing and shaping
  as other fonts found by name.
- Decoding a string counts against the import's memory budget.
2026-11-12 05:01:14 -08:00
Taha-Mahmoodi 5a88399677 Normalize Windows verbatim prefix in script path regression 2026-11-12 17:30:51 +04:30
dotCooCoo 480cd96035 Merge main into feat/dynamic-text-point-type 2026-11-12 05:00:38 -08:00
dotCooCoo 61ac0ce2f4 Merge main into feat/eps-save-use-artboards 2026-11-12 05:00:37 -08:00
dotCooCoo b0ea8176e0 Merge main into feat/docinfo-spot-color-objects 2026-11-12 05:00:32 -08:00
dotCooCoo 72cf92e540 Document Info: Spot Color Objects lists colorized images and skips clear gradients
A grayscale or 1-bit image colorized with a spot color now counts as a
Spot Color Object. A gradient whose stops are all at an opacity of 0
draws nothing, so its spot stops no longer list the object.
2026-11-12 05:00:26 -08:00
dotCooCoo 5e80810605 Merge main into feat/custom-arrowheads 2026-11-12 05:00:21 -08:00
dotCooCoo 0a3abb8534 Stroke: custom arrowheads cap subpaths, file size and preview size
- A custom arrowhead path allows at most 4,096 subpaths; stroke.set
  refuses a longer one and reading drops it.
- A symbol whose shapes cannot be united or clipped is listed in
  skipped instead of becoming a head that misses part of its art.
- The arrowheads file is refused when its document unpacks to more
  than 64 MB.
- Edit Arrowheads creates the starter file only when none exists and
  otherwise opens the file unchanged.
- After a save to the arrowheads file, the heads are read back from
  the written file.
- The plug-in argument check accepts path under startArrow.Custom and
  endArrow.Custom in stroke.set.
- A custom head's menu preview is scaled to fit its box, and rows
  outside the visible part of the menu do not render previews.
2026-11-12 05:00:15 -08:00
dotCooCoo 1eaf4c4023 Merge main into fix/dialog-set-hidden-fields 2026-11-12 04:59:51 -08:00
dotCooCoo 4921f3807e Merge main into fix/warp-styles-map 2026-11-12 04:59:50 -08:00
dotCooCoo 61c37f0b2e Merge main into feat/type-path-center-on-top 2026-11-12 04:59:45 -08:00
dotCooCoo 67ebbf0b53 Merge main into feat/warp-images 2026-11-12 04:59:37 -08:00
dotCooCoo 337bc90d25 Merge main into test/direct-group-selection 2026-11-12 04:59:36 -08:00
dotCooCoo a5d0fe7963 Tests: font menu and menu bar tests allow for fonts and plug-ins other tests change
In a full parallel `cargo test -p vectorcraft-ui-egui` run, other tests
add and remove composite fonts in the process-wide font database and
remove plug-ins from the plug-in registry. Two tests failed when that
happened between their reads, and passed when run alone.

- `font_menu::tests::the_scroll_bar_leaves_the_stars_clear` starred
  `FontDb::global().families()`, but the menu lists the composite fonts
  first, so the top rows had no star. The test now turns on the starred
  filter and counts the rows it listed.
- `tests::nativemenu::the_menu_bar_is_inert_while_a_file_dialog_is_open`
  required every menu row from before the dialog to be back afterwards.
  A row may now be missing only when the composite font or plug-in it
  names is gone from the database or the registry.
- Four font menu tests took the first families from
  `menu_family_list()`, which can be a composite font that is removed
  before the frames run. They take them from the families that stay
  listed. The variable-filter test checks that every family listed
  before the click is listed again, instead of comparing two frames.
2026-11-12 04:58:20 -08:00
dotCooCoo 1d41b403e1 Effects: Outline Object on an image's fill or stroke follows its opaque pixels
An image's own fill or stroke with Outline Object now follows the outline of
the image's pixels that are at least 50% opaque, traced from the alpha and
fitted with curves, instead of the image's frame. An image without
transparency, one whose pixels can't be read, one of more than 64 megapixels
or whose decoded pixels take more than 256 MB, and one whose outline would
need more than 100,000 anchor points keep the frame. An image with no pixel
at least half opaque gives nothing to paint. Images of more than 4 megapixels
are traced from their alpha averaged down to 4 megapixels, and an averaged
pixel that covers a pixel at least half opaque stays at least half opaque, so
thin opaque lines stay in the outline. Each outline is traced once for its
pixels, kept for the next redraw while those pixels are loaded, and dropped
after them; a second thread that needs the same outline waits for the trace.

- vectorcraft-trace: `decode_alpha` reads an image's alpha, and
  `opaque_outline` traces it as Black and White mode at threshold 128.
- vectorcraft-effects: the reshaped image art uses it for rows whose first
  effect is Outline Object; Convert to Shape rows keep the frame.
- Docs: docs/mcp.md, the Outline Object params text and an evidence line in
  docs/target-app-parity.md. docs/mcp.md also says that Use Preview Bounds
  takes in the shapes an image's fills and strokes paint.
2026-11-12 04:58:03 -08:00
dotCooCoo 28dfd66b65 Images: a quarter turn by the orientation swaps the resolution, and every TIFF follows the tag
Opening or placing an image whose orientation turns it a quarter
(EXIF or TIFF Orientation 5 to 8) stored the pixels turned but kept
the resolution as stored, so a photo at 300 x 150 ppi came in at the
wrong width and height. XResolution counts pixels in the ImageWidth
direction of the stored image (TIFF 6.0,
https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf; EXIF
uses the same tag, CIPA DC-008-2012,
https://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf), so a quarter
turn now swaps the axes, in the size Open and Place use and in the
stored image, with jxlread::oriented_resolution as JPEG XL does.

Three kinds of TIFF did not follow their Orientation tag:
- grayscale TIFFs with extra samples and 1-bit CCITT Group 3 TIFFs
  were not turned;
- a CMYK TIFF with its inks together was turned but stored as RGB,
  losing its inks, and one with a plane per ink did not open
  ("Planar TIFF with CMYK color type is not supported").
They now turn as the other images do, and a CMYK TIFF keeps its inks,
8 bits each, written again with the turned resolution.
2026-11-12 04:57:39 -08:00
Taha-Mahmoodi 4c0c6179c9 Fix contextual glyph face, cluster boundaries and insertion status 2026-11-12 17:22:47 +04:30
Taha-Mahmoodi eebf296eb5 Merge remote-tracking branch 'origin/main' into fix/macos-tmp-symlink-tests 2026-11-12 16:45:21 +04:30
Taha-Mahmoodi 2590186b32 Merge remote-tracking branch 'origin/main' into feat/glyph-alternates 2026-11-12 16:45:00 +04:30
BFlat 81247fdae9 Merge pull request #6666 from dotCooCoo/fix/malformed-id-not-missing
MCP: a malformed object id is refused as such, not reported as missing
2026-11-12 19:14:06 +07:00