Commit Graph
1668 Commits
Author SHA1 Message Date
dotCooCoo 3bf25bbf76 Merge main into feat/cgm-open-place 2026-12-05 05:34:40 -08:00
dotCooCoo 590067c3de Merge main into feat/print-per-job-settings 2026-12-05 04:33:55 -08:00
dotCooCoo fd0650358a Merge main into feat/cgm-open-place
craft-metafile moves back to the craft-libs revision the other craft-libs
crates use (4c330f6), off the head of the open craft-libs#5410. The CGM
reader that pull request adds is not on craft-libs main yet, so CGM reading
goes behind a new `cgm` feature in vectorcraft-metafile and
vectorcraft-engine, off by default. Without it, `.cgm` is not listed as
readable or placeable in the format list, the Open and Place dialogs, MCP or
the CLI, `is_cgm` is false and `import_cgm` refuses every file. The engine's
open and place paths stay compiled. The CGM tests in the metafile crate, the
engine and import_fuzz build and run with the feature on. The CGM sections
of docs/mcp.md and the progress docs return with the feature.
2026-12-04 21:35:53 -08:00
dotCooCoo 7548988c4c Merge main into fix/dxf-region-import 2026-12-04 21:00:23 -08:00
.CooCoo 857ea2aa94 Merge pull request #10892 from dotCooCoo/fix/composite-installed-name-place
Place: placed type keeps an installed font that shares a composite font's name
2026-12-04 20:02:26 -08:00
dotCooCoo dcf43d3017 Merge main into fix/dxf-region-import 2026-12-04 19:09:38 -08:00
dotCooCoo 180f9e2d8d Merge main into feat/print-per-job-settings 2026-12-04 18:59:36 -08:00
dotCooCoo 29187c520d Merge main into feat/print-per-job-settings 2026-12-04 18:53:20 -08:00
.CooCoo 4be58b75cd Merge pull request #10144 from dotCooCoo/feat/release-containers
Artwork Cleanup: Release All Containers takes apart every group, clipping mask and compound path
2026-12-04 18:46:43 -08:00
dotCooCoo ab17c55959 Merge main into fix/composite-installed-name-place 2026-12-04 18:17:54 -08:00
.CooCoo f4c65a2f0f Merge pull request #9053 from dotCooCoo/feat/scripts-api-d5-swatches-symbols
Scripts: documents give scripts their swatches, spots, symbols, graphic styles and brushes
2026-12-04 18:08:05 -08:00
dotCooCoo 43d4cb2a25 Merge main into feat/release-containers 2026-12-04 18:03:46 -08:00
.CooCoo 85bd77b528 Merge pull request #9315 from dotCooCoo/feat/scripts-export-for-screens
Scripts: Document.exportForScreens writes artboards, assets or the document into a folder
2026-12-04 17:59:22 -08:00
.CooCoo 32513255bd Merge pull request #10860 from dotCooCoo/fix/placed-dimension-composite-font
Place: a placed dimension keeps the composite font its label was renamed to
2026-12-04 17:59:07 -08:00
dotCooCoo 5cddb35244 Merge main into feat/release-containers 2026-12-04 17:52:15 -08:00
dotCooCoo 4b68cf48eb Merge main into feat/cgm-open-place 2026-12-04 17:46:29 -08:00
dotCooCoo 4b54a5a5d2 Merge main into fix/dxf-region-import 2026-12-04 17:44:16 -08:00
dotCooCoo e69e51dbdd DXF import: REGION entities open as filled paths
A REGION holds its outline as solid-modeler data. The import now reads
it and draws each face's boundary loops as one filled path (even-odd),
so holes stay open. Lines, circles, ellipses and spline edges keep their
shape; coedge and edge directions and a body's transform are applied.

The data is read from the text in groups 1 and 3 (DXF R13 to 2010,
ciphered or not) and from the binary data in the ACDSDATA section (DXF
2013 and later, with either binary signature), so DWG drawings converted
to DXF bring their regions too.

Damaged data is reported instead of drawn silently: edges of other curve
types come in straight, outlines that break off are closed with a
straight line, and a spline edge whose endpoint lies on two parts of a
self-crossing curve is trimmed at the nearer one, each with a warning.
Regions that can't be read, or that go over the record or path element
limits, are left out and listed.

The DXF import fuzz tests now include REGION entities and mutated text
and binary region data.
2026-12-04 17:44:05 -08:00
dotCooCoo 79aea5c009 Place: placed type keeps an installed font that shares a composite font's name
A native file's composite font named like an installed font is not lent
while the file's type is measured for placement, so the type is laid out
in the installed font. Adoption still brought that definition in under a
free name such as "Source Sans 3 2" and renamed the type to it, so the
placed type switched to the composite font it was never measured in.
Adoption now skips the source definitions the font database does not
lend: one named like an installed font, or one that fails its own checks.
2026-12-04 17:43:01 -08:00
dotCooCoo a8d0ac7caf Merge main into feat/print-per-job-settings 2026-12-04 16:44:13 -08:00
.CooCoo 3368ac519c Merge pull request #10871 from dotCooCoo/fix/cad-clipboard-paste
Paste: read CAD apps' metafiles on Windows and copied DXF, DWG and HP-GL files
2026-12-04 16:29:31 -08:00
dotCooCoo 96e66b5e8d Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-04 16:27:43 -08:00
dotCooCoo 50fa1b13f5 Merge main into feat/cgm-open-place 2026-12-04 16:26:04 -08:00
dotCooCoo 9ef408dbd8 File formats: CGM files open and place
File > Open and File > Place read Computer Graphics Metafiles in the
binary encoding of ISO/IEC 8632-3 (.cgm), and a binary CGM also opens
by its content. The first picture comes in on one artboard, its VDC
extent at its metric scale or 576 pt on its longer side, with the
extent's first corner at the bottom left.

- Polylines, disjoint polylines, polybeziers and open arcs are stroked
  with the line width, color, type, caps and joins, and line types the
  picture defines take their dashes from it.
- Polygons, polygon sets, rectangles, circles, ellipses, closed arcs
  and figures are filled by the interior style and outlined with the
  edge attributes while edges are visible.
- Markers become small paths, text becomes point type in the font the
  font list names, and cell arrays become images.
- The clip rectangle clips what follows it.

craft-metafile's CGM reader (craft-libs#5410) plays the picture into
the same model as the PICT reader, so it becomes document objects the
same way; craft-metafile is pinned at that pull request's head until
it merges. Place puts the picture in one group clipped to its frame.
What isn't read comes back as warnings, a picture cut short keeps what
came before it, and clear text and character encoded files are refused
with a message. CGM is not written.

Docs: docs/mcp.md, docs/file-format-parity.md, docs/target-app-parity.md.
2026-12-04 16:20:39 -08:00
dotCooCoo b8e11fb2c7 Place: a placed dimension reuses an equal composite font of the same name
When the document defined a composite font with the same name and the same
definition as one a placed dimension used, but spelled in more than the 256
bytes a dimension's family keeps (a case-insensitive match such as Kelvin
signs for k), placement copied the incoming font under a new name instead of
reusing the document's. The byte limit now applies only to an alias under
another name; a same-name reuse keeps the dimension's own spelling.

Merging main had also left a second, unguarded rename of a dimension's
family next to the guarded one, so a renamed family that was too long or
only differed in case was still written. The unguarded rename is removed.

docs/mcp.md describes how file.place renames a placed dimension's family.
2026-12-04 16:00:35 -08:00
.CooCoo d802cf3cd5 Merge pull request #9259 from dotCooCoo/feat/scripts-api-layer-path-items
Scripts: layers and groups give their own path items
2026-12-04 15:29:12 -08:00
dotCooCoo 7dc78396e0 Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-04 15:11:24 -08:00
dotCooCoo 2b5ca4f2ad Merge main into fix/placed-dimension-composite-font 2026-12-04 15:04:24 -08:00
dotCooCoo 63bc8cbf77 Merge main into fix/cad-clipboard-paste 2026-12-04 14:33:04 -08:00
dotCooCoo 889327e85d Paste: read CAD apps' metafiles on Windows and copied DXF, DWG and HP-GL files
Paste on Windows never read the enhanced metafile that CAD and office
apps put on the clipboard as vector art: windows_formats had no entry for
EMF, so the app pasted their bitmap instead, or nothing. The Windows
clipboard holds an EMF as a handle (CF_ENHMETAFILE, which Windows also
makes from CF_METAFILEPICT), so the app now copies its records with
GetEnhMetaFileBits, at most 64 MiB, and pastes them through
clipboard.importEmf.

A .dxf, .dwg or HP-GL plot file copied in a file manager did not paste,
because file_flavour had no flavour for them, though Open and Place read
all three. They now paste as image/vnd.dxf, image/vnd.dwg and
application/vnd.hp-hpgl through the new command clipboard.importCad
{dataBase64, format: dxf|dwg|hpgl, center?}, read as document.open reads
the file. A file pastes this way only when its bytes are the format, so
a chart script named .plt is not taken for a plot.

Fixes #10819.
2026-12-04 14:32:59 -08:00
.CooCoo 15d90d3f53 Merge pull request #10852 from dotCooCoo/fix/placed-undefined-family-composite
Place: placed type keeps its font when the document has a composite font of its family's name
2026-12-04 14:20:12 -08:00
dotCooCoo 88bd224387 Place: a composite alias skips families named by dimensions in brush art
Planning an alias read dimension option families only from document art.
A dimension inside an art brush's art was reached for graph label families
but not for its own options, so an incoming composite font could take the
family that dimension names, and the dimension's label would switch to the
incoming font on redraw. The brush walk now notes dimension options too.
2026-12-04 14:03:09 -08:00
dotCooCoo b6a5cd2a36 Place: a placed dimension keeps the composite font its label was renamed to
When placed editable art uses a composite font whose name the document
already gives a different font, the placed type is renamed to a free name
such as "Name 2". A dimension's label was renamed, but the dimension's own
options kept the old name, so the next redraw of the label (moving a point,
a refresh) switched it to the document's other font.

- The adoption walker renames a dimension's font family with its label,
  keeping a spelling that already names the same font.
- Planning reserves the families destination dimensions name.
- A generated alias stays within the 256 bytes a dimension's family keeps,
  and a font that an incoming dimension uses reuses only an equivalent
  font whose name fits.
2026-12-04 13:10:47 -08:00
dotCooCoo 49186cb426 Merge main into feat/scripts-api-layer-path-items 2026-12-04 12:28:26 -08:00
.CooCoo 4db38b885e Merge pull request #9300 from dotCooCoo/feat/scripts-show-color-picker
Scripts: app.showColorPicker asks for a color
2026-12-04 11:42:06 -08:00
dotCooCoo 17dd5c2c2b Place: placed type keeps its font when the document has a composite font of its family's name
When placed editable art names a font family that its file does not define
as a composite font, and the document defines a composite font of that
name, the placed type was measured in the file's font but drew in the
document's composite font after placement. The placed type now gets a free
name such as "Name 2", so it keeps the font it was laid out in. Placing the
same art again reuses that name.

- The renaming also covers the fonts a file carries for its type and the
  label font of a live dimension, so they stay paired with the renamed runs.
- An installed family is not renamed.
- The installed-name check applies only to the composite fonts a
  placement adds, so a definition already in the document does not stop it.
- docs/mcp.md describes the renaming under file.place.
2026-12-04 11:31:32 -08:00
dotCooCoo 516b7eb321 Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-04 07:56:23 -08:00
dotCooCoo d5a54ccffa Merge main into feat/scripts-api-layer-path-items 2026-12-04 02:57:25 -08:00
FredApps 6f6a6d4e20 Merge branch 'main' into codex/10008-native-composite-adoption 2026-12-04 10:31:44 +01:00
dotCooCoo 232b9e1597 Merge main into feat/scripts-show-color-picker 2026-12-04 01:13:39 -08:00
dotCooCoo ba27846c2a Merge main into feat/print-per-job-settings 2026-12-04 01:02:33 -08:00
dotCooCoo 69afdf9194 Merge main into feat/scripts-api-layer-path-items 2026-12-04 01:01:08 -08:00
dotCooCoo 472d7f8e69 Direct Selection: picked handles stay picked after a Cmd/Ctrl+Shift drag
With two direction handles picked, a Cmd/Ctrl+Shift press on one of them
drags that handle alone with its opposite handle mirrored and its angle
constrained. Shift kept the press from counting as a press on one of
several picked handles, so the press did not record the picks, and its
release after a drag, or Escape during it, left only the pressed handle.

The press now records the picks for any mirroring press on one of several
picked handles, with or without Shift. Shift still keeps a drag from
moving every picked handle, and a Shift-click still adds or removes the
pressed handle.
2026-12-03 22:29:17 -08:00
dotCooCoo 74b2ffdb82 Direct Selection: picked handles stay picked after a Cmd/Ctrl drag
A Cmd/Ctrl press on one of several picked direction handles drags that
handle alone so its opposite handle mirrors. The press cleared the picked
handles, and neither the release nor Escape restored them, so after the
drag only the pressed handle could be picked again.

The press now records that it is such a mirroring press. Its release
after a drag, and Escape during the drag, restore the handles that were
picked when the press began. A drag without Cmd/Ctrl still moves every
picked handle, and a click still picks the pressed handle alone.
2026-12-03 21:26:45 -08:00
dotCooCoo b44dbefe12 Direct Selection: a Cmd/Ctrl drag of one of several picked handles mirrors
With two or more direction handles picked, a press without Shift on one
of them started a drag of all the picked handles (path.moveHandles),
which never mirrors. A Cmd/Ctrl press that Direct Selection now keeps on
a shown handle therefore translated every picked handle instead of
mirroring the opposite one.

press_handle now drags the pressed handle alone when the press mirrors
(Cmd/Ctrl without Alt, and not the press that lent the tool from another
tool), so the drag mirrors its opposite handle and the other picked
handles stay where they are. A drag without Cmd/Ctrl still moves every
picked handle.
2026-12-03 12:59:09 -08:00
dotCooCoo c4856b8830 Merge main into fix/direct-select-ctrl-handle-mirror 2026-12-03 11:33:13 -08:00
dotCooCoo 48ef8740e9 Direct Selection: Ctrl held before pressing a handle mirrors the opposite handle
With Direct Selection chosen, Cmd/Ctrl lends the Selection tool for the
press. That loan also took presses on the end of a shown direction handle,
so a Ctrl-drag on a handle moved the whole object (and anything selected
with it), or drew a marquee where no object was under the handle. Only Ctrl
added after the drag began mirrored the opposite handle.

A new Tool::keeps_cmd_press lets the active tool keep a Cmd/Ctrl press.
Direct Selection keeps one without Alt on the end of a shown handle of a
path, of type on a path, or of a selected blend spine anchor, so the drag
mirrors the opposite handle, with Shift constraining it. The session's
lent_tool_at asks it, so the press, the cursor and the status bar agree. A
press elsewhere, on a handle of the bounding box the lent Selection tool
shows, or with Cmd+Alt (Group Selection) is still lent as before.

docs/gaps.md and docs/ui-parity.md describe the press.
2026-12-03 11:33:13 -08:00
dotCooCoo 644a4e6b8c Merge main into feat/scripts-export-for-screens 2026-12-03 11:15:24 -08:00
dotCooCoo 8e23837867 Merge main into feat/scripts-api-layer-path-items 2026-12-03 11:15:06 -08:00
dotCooCoo 78a3861135 Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-03 11:13:42 -08:00