Web builds and FreeBSD on 64-bit ARM have no DWG decoder, yet File ›
Open, File › Place, their "All readable files" and "All placeable
files" filters, `openExtensions`, `document.formats`, the MCP open_file
description and the CLI help all offered `.dwg` there, and a DWG file
then failed in the missing decoder.
- `vectorcraft_cad::dwg::DECODES` says whether the build decodes DWG.
- `readable_format`, `open_exts()`, `place_exts()` and the per-format
dialog filters leave DWG out where it is false; `document.formats`
reports `dwg` as not readable there.
- An installed `.dwg` importer plug-in is used for such files on those
builds, by File › Open, File › Place and folder batches, and the
desktop app skips its background DWG conversion there.
- Without an importer, File › Place keeps the DWG-specific error, and a
`.dwg` file is still not read as HP-GL.
The listing functions take the decoder availability as a parameter, so
the new test checks both cases on every platform.
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.
The time-limit test checked only the worker's exit code, which the
test-lint exit-status-only rule rejects. It now also reads the worker's
output and checks that nothing was written before it exited.
- File > Open of a DWG drawing that is being converted for Place no
longer does nothing: only conversions started for opening count as
that file already being opened.
- A DWG worker gets an absolute deadline (`--dwg-worker-until`, in
milliseconds since the UNIX epoch) instead of a time limit counted
from its own start. `thumbnail` sets it when its own timer starts, so a
worker started late no longer outlives the thumbnail process. A worker
whose deadline has passed exits with code 1 at once.
Opening or placing a DWG drawing from the desktop UI converted it on the
UI thread before DXF Import Options opened, so the window stopped
responding until a large drawing was converted. File > Open, Open Recent,
the Home screen, a drop and Place now convert it on a job of their own;
the status bar says "Converting <name>..." and the dialog opens once the
conversion is done. A drawing that can't be converted is reported and
does not go on the recent files. Commands run at once (MCP, scripts)
still convert before they return.
`thumbnail` exits after 20 seconds, but a DWG worker it started kept
running after that. The CLI now starts the worker with
`--dwg-worker-seconds 20`, and a worker started that way exits with code
1 once its time is up.
The CLI `info` test requires the drawing cut to a third and the one cut
to its header to be refused. The File formats row and the DWG entry in
docs/target-app-parity.md name the remaining limits: the web build and
R1.x and R2.x drawings return an error that says to save as DXF.
- The DXF Import Options dialog test opens a DWG, confirms it at 1:1
in model space and places it.
- `vectorcraft-cli info` reads a DWG as the DXF it was written from,
and five damaged copies (cut short, overwritten, bytes flipped) end
in an error that names DWG or open with warnings, with the process
exiting normally.
- The engine's DWG and DXF test modules are listed in order.
egui hints text by default, so a TrueType face without hinting
instructions goes through skrifa's automatic hinter. In skrifa 0.44,
which epaint, glifo and usvg use, the hinter's long blue-zone search
never ends for a tall narrow Hebrew letter such as U+05D1, so the
font list stopped responding as soon as a row drew that letter in
such a face.
- Cargo.toml: skrifa 0.44 in [patch.crates-io] comes from craft-libs
vendor/skrifa, which adds skrifa 0.46's exit to that loop, and
every craft-libs rev moves to that commit.
- apps/vectorcraft-web/Cargo.toml and xtask/src/pdf_deps.rs: the same
craft-libs rev.
- font_menu tests: a face built in memory with no hinting
instructions lays out U+05D1 through egui's Fonts with the default
text options.
Fixes#10493
File > Open, File > Place and document.dxfInfo read DWG drawings. The
craft-libs craft-dwg bridge converts the drawing to DXF bytes and the
existing DXF reader reads them, so a DWG takes the DXF Import Options
(layout, ratio or fit, lineweights, centering, merged layers) and comes
in with the same layers, blocks and units as the DXF it converts to.
What the conversion skips is listed in the warnings.
- vectorcraft-cad: dwg module. On desktop the conversion runs in a copy
of the program started with --dwg-worker (vectorcraft and
vectorcraft-cli call serve_if_asked and use_own_worker), so a damaged
file ends that copy, not the app. Inputs over 512 MiB, or a DXF
rendition over 1 GiB, are refused. The last conversion (up to 128 MiB
of DXF), or its error, is kept, so the dialog's layout list, each
layout preview and the open read the file once. R1.x and R2.x
drawings are refused with a hint to save as DXF.
- Engine: a read-only dwg format (detected by content or by .dwg),
in the open and place extension lists, not associated with the app
by packaging. DWG leaves the unsupported list; exporting to it says
to export DXF instead, Export As keeps it greyed out, and Save over
the drawing is refused.
- UI: the DXF Import Options dialog opens for .dwg files on Open,
Place and a Shift-click with the place cursor.
- NOTICE and licenses/acadrust-0.6.6/: acadrust 0.6.6 (MPL-2.0,
unmodified) and its third-party notices.
- Docs: docs/mcp.md, docs/file-format-parity.md, docs/roadmap.md and
the progress line in docs/target-app-parity.md.
Tests build DWG files from DXF drawings with craft-dwg's writer: a DWG
comes in as its DXF does (layers, bounds, strokes, units, blocks), with
the DXF options, through Place, and in dxfInfo; a truncated DWG is an
error; saving or exporting a DWG writes nothing.
Fixes#3450
CUPS (cupsSetServer) reads the digits after the last colon of an
unbracketed server name as its port, so `::1` names host `:` on port 1.
scheduler_is_local took any unbracketed name with several colons as a
host without a port and matched `::1` as loopback, so `::1` with
IPP_PORT=8631 used the local PPD folder for a queue on another
scheduler. It now splits such a name at its last colon when the last
group starts with a digit, as CUPS does. The IPv6 loopback is local
only as `[::1]`, which docs/mcp.md now names.
The desktop app sends every link it opens (Help menu community links, the
app bar's Discord button, Home's Community links, About and credits, help
links in dialogs, the updater's Open URL, an object's URL attribute) as
egui's OpenUrl output. The app built eframe without its `links` feature, so
egui-winit only logged "Cannot open url - feature \"links\" not enabled." and
nothing opened.
Turn on eframe's `links` feature in apps/vectorcraft. Cargo.lock adds
webbrowser 1.2.8. The web build does not use egui-winit and is unchanged.
The feature can be removed once the craft-libs pin includes
storytold/craft-libs#5083, which opens links in the shared app setup.
A raster width or height that needs more than 64 or less than 0.01
pixels per point was written at the clamped size with no note. The
export now adds a warning naming the requested and the written size,
for MCP export and the CLI's --width and --height alike.
The raster export already reads width, height and background, but the
CLI only passed scale and ppi, so those options were reachable through
the MCP export tool alone. convert and run now take --width N,
--height N and --background V and send them for raster outputs only.
A width or height that is not a positive finite number, and a missing
or unreadable background, are refused when the flags are read, for
every output format.
Fixes#10577
With no CUPS_SERVER or ServerName and no CUPS domain socket, CUPS uses
localhost on the IPP_PORT port. The local PPD check treated that case as
local on any port, so with IPP_PORT=8631 the Print dialog listed the local
PPD's sizes instead of those of the scheduler on 8631. The check now
resolves the implicit scheduler the way the IPP lookup does: a CUPS socket
is local, and otherwise localhost on IPP_PORT is local only on port 631.
An IPv6 address named as the CUPS server without brackets (`fd00::cafe`,
or `fd00::cafe:8631` with a port) produced an IPP queue URI with the
address unbracketed, which ipptool rejects, so a queue with no PPD and
no lpoptions sizes listed no paper sizes. ipp_queue_uri now splits the
host and port as cupsSetServer does, brackets an IPv6 host and encodes
a zone separator as %25.
The local PPD check ignored IPP_PORT, so `CUPS_SERVER=localhost` with
`IPP_PORT=8631` read this machine's PPDs for another scheduler's
queues. A server named without a port now takes the IPP_PORT port
before the check.
The IPP fallback and the local PPD check came in #10581.
`file.print` treated `paper: null` like an omitted `paper`; a null value is
now an error, as the params text already says for anything but a keyword.
The Print dialog leaves `paper` out of its job when the driver lists no
keyword for the Size chosen.
A `CUPS_SERVER` or `ServerName` that names a domain socket counted as this
machine's scheduler for any path, so the dialog read `/etc/cups/ppd` for a
second scheduler on another socket. Only CUPS's own sockets, the sockets
the `Listen` lines of `/etc/cups/cupsd.conf` name, and links to either now
read the local PPDs. The IPP lookup asks `localhost:631` for CUPS's own
sockets and links to them only. A `\#` in a `cupsd.conf` path keeps its `#`,
as in `client.conf`.
Follows up #10581.
- Preferences OK sends only the agent settings changed in the window, before prefs.set, so a refused one
applies nothing and one changed through prefs.agents while the window is open keeps its value.
- mcp --when-closed error refuses when there is no settings folder instead of going headless.
- Docs: automation roots make plain mcp headless; a session that went headless needs a new MCP session
for the window; a window-run export may still finish after cancellation; crate docs name the
closed-app choices.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
While the launcher's Settings > AI agents switch names VectorCraft, the
window serves its control channel on loopback with craft-libs' AgentLink
and publishes agent-connection.json; plain `vectorcraft-cli mcp` finds it
on every tool call through the shared Live (challenge handshake, no port or
token in client configs) and otherwise runs headless or follows the
closed-app choice. Agent requests in the window are confined to the agent
folders. Preferences gets an AI Integrations page (the shared Agents page),
saved through the new UI command prefs.agents, which agents can't change.
New MCP tool agent_folders; `--when-closed`; `--connect` deprecated.
Closes#10621, closes#1470, closes#10453.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With the Color or Gradient panel open as a pop-out, every second frame
at rest ran the whole window twice: egui discarded the first pass
because a content column in the panel body measured differently from
the transcript its flyout kept. storytold/craft-libs#4932 fixes the
layout memory, and this moves the craft-libs pin to its head
c2a47dfe, which is craft-libs main 092a2c6b with the fix. The egui and
winit revisions are unchanged.
The bump also brings in craft-libs #4584, #4804, #2415, #4531, #4676,
#3061 and #4050.
Test: with either pop-out open, each of 10 frames at rest runs one pass.
A `CUPS_SERVER` or `ServerName` of `localhost`, `127.0.0.1` or `::1` counts
as this machine's scheduler only with no port or port 631. On another port
(a second CUPS instance) the dialog no longer reads `/etc/cups/ppd`, whose
queues belong to the default scheduler, and asks `lpoptions` and IPP
instead.
When the named server is one of CUPS's own domain sockets and neither the
PPD nor `lpoptions` lists sizes, the IPP lookup asks `localhost` on the IPP
default port, as it already does when no server is named. `ipptool` rejects
a URI whose host is a socket path (`httpSeparateURI` in CUPS's
`cups/http-support.c`), so another socket path is not asked.
When CUPS_SERVER or client.conf's ServerName names a remote scheduler,
the Print dialog no longer reads a same-named PPD under /etc/cups/ppd.
The job goes to the remote queue, so the sizes now come from that
server through lpoptions and IPP. A domain socket, localhost, 127.0.0.1
and ::1, with an optional port and /version= suffix, still count as
local and keep the PPD lookup.
ipp_queue_uri built ipp://host/printers/name from CUPS_SERVER or the
client.conf ServerName, so a server named without a port was always asked
on 631, while CUPS clients use IPP_PORT for it. The app now reads
IPP_PORT and passes it in; a port in the server name keeps precedence, and
a bracketed IPv6 host counts as having a port only after its ]. With no
server named, the lookup uses localhost on IPP_PORT only when none of the
CUPS domain sockets exists, since CUPS otherwise talks to its socket.
docs/mcp.md describes the lookup's server and port.
File > Print listed the system's printers on the UI thread when the
dialog opened and on each Refresh, so a slow or unreachable print
server froze the app. The desktop print service now offers its
discovery to a background job; the dialog opens on Default Printer and
PDF File, shows and announces the lookup, and takes the list when it
arrives.
- Discovery on Windows lists the queues without asking each driver for
its capabilities (`craft::print::printer_queues`).
- PDF File, its preview and Done stay available during the lookup.
Print to a printer is disabled until the list is applied, and a held
Print to a printer is not submitted.
- Setup... appears once the lookup has ended, since it reads the
printers again on Windows.
- Discovery starts on the first pass even when another drawing is
active, and a lookup that ends without a list leaves Default Printer
and PDF File.
The Print dialog's discovery came with #8800.
cups_server() took everything after ServerName, so a line such as
"ServerName print.example.com # office" gave a value that
ipp_queue_uri rejects, and IPP paper discovery was skipped. The value
is now read as CUPS reads the file: the first unescaped # starts a
comment, and \# stands for a literal #. On macOS, which does not read
ServerName, only CUPS_SERVER is used.
On macOS and Linux the print job carried no media option, so the queue
printed on its default paper whatever Size the Print dialog showed. The
dialog now sends the driver's keyword for the chosen Size, and
file.print takes it as `paper`; the job passes it to CUPS as `media`.
A `paper` that is not a single keyword is an error, and so is `paper`
with file output, with directPdf or on Windows, where the spooler does
not apply it. While the chosen printer's sizes are still loading, Print
is refused and the dialog stays open.
A queue with no PPD on this machine (a driverless or remote printer)
listed no paper sizes. Its sizes now come from `lpoptions -p NAME -l`,
and when its server has no PPD either, from the queue's IPP
media-supported attribute on the scheduler CUPS uses. CUPS's B4 and B5
keywords are the JIS sizes, and ISOB4 and ISOB5 the ISO ones.
Builds on the printer paper lookup in apps/vectorcraft/src/printing.rs
(#10511).
Each printer choice in the Print dialog started a new thread to read the
driver's paper sizes, even while earlier reads were still running. A
driver that stalls (printer enumeration has no time limit) left one
thread behind per printer change.
A new read now waits for the running worker. Only the newest choice is
read once that worker ends. When the newest still-running worker has run
15 seconds, the waiting read starts beside it, up to 4 workers in all. A
read that waits 15 seconds with 4 stalled workers gets no driver sizes,
and the dialog keeps its own sizes.
The lookup came from #10511.