Commit Graph
136 Commits
Author SHA1 Message Date
dotCooCoo 6050e48b5d Merge main into docs/complete-message-languages 2026-11-14 04:46:28 -08:00
BFlat 73b9eee842 Merge pull request #7151 from dotCooCoo/fix/i18n-literal-brace-messages
i18n: messages with literal braces match only their own catalog row
2026-11-14 19:38:19 +07:00
dotCooCoo 6c26233a63 Clipboard: quitting on Linux takes every window off screen before the clipboard wait
Quitting can wait up to 27 s for the clipboard handles to let go before
eframe closes the windows. winit cannot hide a native Wayland window, so
the main window stayed on screen for that wait, and the X11 windows of
floating panels and documents were not hidden at all.

- A native Wayland main window is unmapped by attaching no buffer to its
  surface. The window and its connection stay open for the Wayland
  clipboard. An X11 main window, XWayland included, is hidden as before.
- On Linux the X11 windows of floating panels and documents are recorded
  as eframe creates and drops them (viewport hooks), and quitting unmaps
  them through a second X11 connection before the wait.
- The new module apps/vectorcraft/src/quit_windows.rs replaces
  app::hide_before_teardown, with tests of which windows are hidden or
  unmapped. portal_save's Wayland surface helper is shared with it.
2026-11-13 22:02:56 -08:00
dotCooCoo d57cc3896f Docs: the complete-message language lists match COMPLETE_MESSAGES
The development guide and the progress doc now name all 23 languages in
COMPLETE_MESSAGES: Hindi was missing from the first, and Georgian, Hindi,
Turkish and Catalan from the second. The localization summary adds
Bosnian to the languages marked full that are not in the list.
2026-11-13 21:28:53 -08:00
dotCooCoo 88012ed92b Merge main into fix/i18n-literal-brace-messages 2026-11-13 19:15:55 -08:00
BFlat 9fcfc81cc2 Merge pull request #7336 from dotCooCoo/fix/i18n-scan-gaps
i18n: the untranslated report checks the effects, map_err messages and schema phrases
2026-11-14 08:40:23 +07:00
dotCooCoo c6211b35ab Docs: the Linux title bar paragraphs describe the frame the desktop draws
docs/control-protocol.md said the window has no OS decorations on
Windows and Linux. On Linux and the BSDs the app bar is the title bar by
default only on a Wayland session without server-side decorations, such
as GNOME, in a window not opened through XWayland; elsewhere the desktop
draws the frame unless VectorCraft Title Bar on Every Desktop or
VECTORCRAFT_TITLEBAR=app turns the app frame on. The paragraph now says
so.

docs/development.md said the custom title bar is the Linux default. It
now says where the app bar is the default title bar. The comment on
CUSTOM_TITLEBAR in apps/vectorcraft/src/titlebar.rs made the same
Windows and Linux claim and now names Windows only.
2026-11-13 16:24:44 -08:00
dotCooCoo c0e70819f4 i18n: the untranslated report checks the effects, map_err messages and schema phrases
The untranslated report missed messages that reach the status bar:

- MESSAGE_CRATES now includes effects, color, render, three-d and pathops,
  whose errors the engine and the effects pass on (SVG filters, swatch
  libraries, raster sizes and encoders, 3D solids, path operations).
- The scan reads the messages a .map_err closure returns, from each if
  branch, match arm and the last expression of a block, the messages of
  a handler that .map_err(name) names (a closure bound with let, or a
  function), and the message given to a variant of an enum whose name
  ends in Fail (CompileFail::Syntax). The steps of a script result's
  path ([{i}]{place}, .{k}{place}) are not messages.
- The report and the VECTORCRAFT_I18N_DUMP_MESSAGES dump include the
  phrases a parameter schema's error builds at run time (SCHEMA_PHRASES).

Missing translations stay report-only. On main at 0b29b2b1f6 the report
lists 126 more messages, missing in all 23 languages that translate
every message: 43,084 missing rows before, 45,983 after.
2026-11-13 16:06:26 -08:00
dotCooCoo eb5ecde44a Merge main into fix/i18n-literal-brace-messages 2026-11-13 15:11:32 -08:00
dotCooCoo 796100e388 Merge main into fix/flatpak-clipboard-images 2026-11-13 09:59:55 -08:00
dotCooCoo 704b5793fc Merge main into fix/flatpak-clipboard-images 2026-11-13 09:09:59 -08:00
dotCooCoo c3ee8fa639 Merge main into fix/i18n-literal-brace-messages 2026-11-13 07:54:35 -08:00
dotCooCoo 83aedc8871 Merge main into fix/quit-waits-for-clipboard-read 2026-11-13 07:43:55 -08:00
dotCooCoo 94e2a8e24b i18n: messages with literal braces match only their own catalog row
The message scan read every message as a format string, so a plain
literal such as `expected {"dataBase64": "…"}` became the catalog key
`expected {"dataBase64"}`, a template whose placeholder took the rest of
any message starting with "expected". The plug-in output error
`expected value at line 1 column 1` was then shown in German as
"erwartet: value at line 1 column 1".

- The scan doubles every brace of a message that is not a format string
  (a plain literal or a `&str` constant); `format!` strings and
  `#[error(...)]` strings keep their `{{`, `}}` and placeholders.
- 150 `@msg` rows in 23 catalogs are keyed by the full message with its
  braces doubled, and their translations write those braces doubled and
  carry the full JSON example of the English.
- An `@msg` row with no placeholder is an exact message under its text
  with `{{` and `}}` read as braces, so it is found at any length, and a
  nested JSON part translated by such a row shows single braces.
- The Hindi row for `give {key, value} or {values}` translates the whole
  message; it kept the English "or" and left out "give".

Docs: docs/development.md, the zh-hant.tsv header, docs/target-app-parity.md.
2026-11-13 06:34:40 -08:00
dotCooCoo 0fd757c6b8 Clipboard: the window closes at once and quitting waits up to 27 s for the Paste check
On Linux the Paste menu's background check holds its own clipboard
handle. When the app quit while that check's X11 text read was still
unanswered, quitting stopped waiting for the check's thread after 5 s,
but the handle's read worker holds arboard's handle until 25 s after the
read was sent. The app's own handle was then dropped first, so it was
not the last one alive to hand what was copied to a clipboard manager.

- CLIPBOARD_PROBE_STOP_WAIT (27 s, exported from vectorcraft-ui-egui)
  replaces the 5 s bound: the 25 s X11 read limit plus LOAD_WAIT, the
  2 s limit on waiting for a reader to stop. Quitting still ends after
  it when a host's handle never lets go.
- On Linux and the BSDs, on_exit hides the main window before eframe
  drops the app, so the window closes at once while the process waits
  for the clipboard handles. The window is hidden, not closed, and the
  connection the clipboards use stays open. winit hides X11 windows,
  XWayland ones included; it cannot hide a native Wayland window, which
  stays on screen until the wait ends. macOS and Windows are unchanged.
- Probe's Drop waits through an injectable function, so a test drives
  the wait with a controllable clock while the probe's handle is still
  being dropped and checks that it is dropped before the app's.
- A Linux test in the app checks the bound against X11_READ_LIMIT and
  LOAD_WAIT, so raising either fails it.
- Comments and docs/development.md describe the wait.
2026-11-13 04:33:41 -08:00
dotCooCoo 6bf988a0e1 Clipboard: the Flatpak on GNOME copies and pastes pictures and SVG with other apps
Where arboard has neither data-control nor X11 (the Flatpak on a GNOME
Wayland session), Copy and Paste used smithay-clipboard on the window's
connection, which carries text only. They now use a core wl_data_device
client on that connection.

- One Copy offers the PNG as image/png, the SVG as image/svg+xml (with
  Include SVG Code on) and the text as text/plain;charset=utf-8,
  UTF8_STRING and text/plain. A format with no data is not offered.
- Paste reads SVG, then text, then PNG. Blank text, or text that only
  names a picture, gives way to the PNG, and a failed or empty SVG read
  falls back to the types after it. The Paste menu item is enabled by the
  types offered, without reading any data.
- The clipboard holds VectorCraft's Copy while its data source is not
  canceled and the offer has the Copy's types.
- A read takes 64 MiB at most. Text waits 2 s, SVG and PNG 10 s off the
  UI thread. Another app's paste is sent on its own thread, 8 at once.

smithay-clipboard is no longer a dependency of the app.
2026-11-13 02:31:04 -08:00
dotCooCoo 345cd021dc i18n: Dutch translates status and error messages
Dutch was not in COMPLETE_MESSAGES, so with the interface in Dutch
script errors, plug-in manifest and permission errors, parameter
schema errors, 3D effect refusals, file-reader errors and data-set
messages showed in English.

- nl.tsv gains 557 `@msg` rows and one `@msgplural` row: the messages
  the German catalog translates and Dutch lacked. Most are one block
  with a header comment on their conventions, in the order de.tsv
  holds them; the rest sit next to the related existing rows.
  Backticked names, command ids, double-quoted values and bare true,
  false and null stay as the English writes them.
- nl joins COMPLETE_MESSAGES, so the message tests that iterate the
  list check Dutch too, and the untranslated report lists Dutch's
  missing messages. It lists the same set for Dutch as for German.
- The registry comment, docs/development.md, the Dutch row and
  introduction of docs/localization-parity.md, and the interface
  languages line of docs/target-app-parity.md list Dutch among the
  languages that translate messages.
2026-11-13 01:23:19 -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 5a88399677 Normalize Windows verbatim prefix in script path regression 2026-11-12 17:30:51 +04:30
Taha-Mahmoodi 59bc3677fe Fix macOS temporary-path expectations in engine tests
Canonicalize test roots before path comparisons and case-variant script probes. Production access checks are unchanged.\n\nFixes #6860
2026-11-12 16:26:48 +04:30
Taha-Mahmoodi 5a9c297608 Compile clipboard failure helper only for its callers 2026-11-12 11:36:34 +04:30
dotCooCoo d7a32d09ec Merge main into feat/hang-report 2026-11-11 18:28:39 -08:00
dotCooCoo 2ce702eda0 Clipboard: a paste after an unanswered Wayland text read waits for its answer
The core-protocol text clipboard (used where the compositor has no
data-control protocol and there is no X11) failed a paste at once after
its 2 s read timeout, so the paste took the internal clipboard even when
the other app's text came within the paste's 10 s limit. It now keeps a
text read that got no answer in its wait, as the arboard path does, and
the paste waits for that answer on its background thread until 10 s
after the read was sent. The answer is pasted unless it is empty or the
text copied here.
2026-11-11 16:20:52 -08:00
dotCooCoo 14c8385df3 Clipboard: a paste after an unanswered read waits for its answer
When the check whether the clipboard still holds what VectorCraft copied,
or one of a paste's own reads, gets no answer within its 2 s, the read is
kept. The paste then waits for that answer on its background thread, up
to 10 s after the read was sent, instead of failing its other reads at
once and pasting the internal clipboard. When the answer is what
VectorCraft copied, or none comes, the paste takes the internal
clipboard; otherwise the clipboard is read as a paste reads it, with that
answer standing in for its read. An answer that came before the paste is
dropped and the clipboard is read again.
2026-11-11 15:49:27 -08:00
dotCooCoo 7f641b9c10 Help: a stalled interface writes a hang report, and Copy Troubleshooting Info copies it
When the interface thread stays in one part of a frame for 3 s, a
watching thread writes a hang report to the log and to
logs/hang-report-<process id>.txt. The report gives the part of the
frame (input hook, logic, interface, or the renderer after a frame in
which any window had input), a system clipboard call in progress, the
last 8 different command ids, the last 16 frame times, the platform,
window system, desktop and session type, Flatpak, graphics adapter, the
present mode and frame latency the app asks for, the running time and
the number of open documents. It holds no document contents, file paths
or command parameters. The interface thread marks its stages with a few
atomic stores a frame, and the watching thread reads those marks without
waiting on it.

The process keeps the report file locked until the interface answers
again, then removes it. A file nobody holds at a later launch was left
by a session that was closed while it did not answer: the launch writes
the report to the log, moves the file to logs/hang-report.1.txt and,
unless another start-up message is showing, says so in the status bar.
Help › Copy Troubleshooting Info puts the platform facts, the recent
commands and frame times and both sessions' reports on the clipboard for
a bug report. An in-line file dialog, an open menu of the macOS menu bar,
and the time after a frame that minimizes or hides the window or starts
moving or resizing it are not timed.

The menu label and the two status messages have rows in every catalog.
2026-11-11 15:19:35 -08:00
dotCooCoo 78f412f0a3 Clipboard: a paste's bitmap read waits for the owner off the UI thread
A paste on Linux and the BSDs read the bitmap on the clipboard worker but
waited up to 10 s for it on the UI thread, so a bitmap from an app that
never sent its data froze the window long enough for the compositor to
offer to close it.

The paste now sends the bitmap read to the worker and returns at once;
its background thread waits up to 10 s for the answer and converts it to
PNG. While that read is open, other reads fail at once instead of
queuing behind it. Each read gets its own answer channel, so a late
answer is dropped. The check of whether the clipboard still holds the
app's own bitmap waits 2 s at most, as text does.
2026-11-11 14:57:01 -08:00
dotCooCoo 825620eb6c Clipboard: Linux and BSD reads wait 2 s at most for the app that copied
arboard's Wayland data-control read waits for the app that owns the
clipboard to send its data with no time limit, and its X11 read waits up
to 4 s for each format it tries. These reads ran on the UI thread: a
Copy or Cut checking what the clipboard held, a paste, and the paste
check once its background thread is gone. A clipboard owner that never
sent its data froze the window.

On Linux and the BSDs, arboard's reads now run on a worker thread with a
clipboard handle of its own. Text and file lists wait 2 s at most and a
bitmap 10 s; the core-protocol fallback's text reads already wait 2 s.
While a read is unanswered, later reads fail at once. Writes stay on the
UI thread's handle.

The core-protocol fallback's worker is now generic and built on every
platform. On X11, closing the clipboard within 25 s of a read that got
no answer waits for that read to end, so the app's own handle is the
last one and hands the copy to the clipboard manager. On data-control
and the core protocol, closing does not wait for an unanswered read.
2026-11-11 12:06:33 -08:00
dotCooCoo edaf6cbc07 Linux: docs say which VECTORCRAFT_TITLEBAR values take precedence
Only app, system and desktop override the frame choice. Any other value, such as unknown, is ignored, so System Title Bar still applies.
2026-11-08 20:20:27 -08:00
dotCooCoo 81149bb945 Linux: VECTORCRAFT_TITLEBAR takes precedence over System Title Bar for one run
On Linux and the BSDs, VECTORCRAFT_TITLEBAR=app now uses the app bar as the title bar with System Title Bar on. Before, System Title Bar kept the desktop's frame while the Preferences note said the variable chooses the title bar.

While the variable is set, Preferences dims System Title Bar, and the note that System Title Bar takes precedence over VectorCraft Title Bar on Every Desktop does not show. macOS and Windows do not read the variable.
2026-11-08 18:31:31 -08:00
dotCooCoo fb413b39f3 Title bar: a Linux and BSD preference uses the app bar where the desktop draws the frame
Squashed from #6101 onto main.
2026-11-09 00:27:21 +07:00
ruchirguitar 70f798b71d i18n: add Hindi interface and message catalog 2026-11-06 12:40:10 +07:00
dotCooCoo e8e09af782 Brushes: Calligraphic and Scatter values follow pen tilt, bearing and rotation
Squashed from #5031 onto main.
2026-11-02 14:33:02 +07:00
bflatastic 51dcb94661 Fix #4967: a drawing tablet's pen draws on a Wayland session by default
On a Wayland session Linux Display Server's default, Automatic, opened
the window on native Wayland. winit 0.30 doesn't bind the Wayland tablet
protocol, and KWin (since Plasma 6.3) and Mutter turn no tablet input
into pointer input, so the pen moved only the compositor's cursor and
the app got no motion or presses. Only X11 (XWayland) When a Pen Is
Attached, which users had to find and choose, sent the window through
XWayland, where the pen works as a mouse with its pressure.

Automatic now opens the window through XWayland when a pen is attached
as the app starts, as PhotoCraft does by default.
VECTORCRAFT_NATIVE_WAYLAND=1 keeps the window on Wayland, like
PhotoCraft's PHOTOCRAFT_NATIVE_WAYLAND. The X11 choice is unchanged.
2026-11-01 05:32:30 +07:00
bflatastic 9b17e38a5c Fix #4892: a file opened while VectorCraft runs opens in that window 2026-10-31 23:11:00 +07:00
aiongg 8ae1f7dae6 docs: tidy agent, contributor and asset docs 2026-10-31 04:17:23 +00:00
wjrichardsandClaude Opus 5.5 7a86f94282 Linux clipboard: a Wayland core-protocol read waits 2 s at most
smithay-clipboard's load() waits for the selection owner's data with no limit, and
Paste and the "is the clipboard still ours" check read on the UI thread, so an owner
that never sends its data froze the window. Reads now run on a worker thread with a
second clipboard on the window's connection and are waited for 2 s at most. While a
read that timed out is unanswered, later reads return at once instead of queueing
behind it, and its late answer is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:12:17 +07:00
wjrichardsandClaude Opus 5.5 dd934dfd4e Linux clipboard: copy text through the core Wayland protocol
Where arboard can't open (GNOME has no data-control protocol, and the Flatpak on a
Wayland session has no X11), Copy and Paste use the compositor's core data-device
protocol on the window's own connection through smithay-clipboard, already in the
build through egui-winit: text only, a copy's text or its SVG markup. A bitmap-only
copy reports that this clipboard carries text only and leaves it as it was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:12:17 +07:00
wjrichardsandClaude Opus 5.5 c988af83b5 Linux clipboard: stop the retry storm
The Flatpak on GNOME has no X11 (fallback-x11 on a Wayland session) and GNOME offers
no data-control protocol, so arboard::Clipboard::new() failed every time. The handle
was kept only on success, so the background Paste check reconnected to the compositor
and logged a warning every 250 ms: 267k warnings in 18 h, the 16 MB log full in 3 h.

- A clipboard that can't be opened is tried again after 1 s, doubling to a minute.
  A Copy or Paste of the user's retries at most once a second.
- The outage is logged once (WARN) and its end once (INFO), across the UI's and the
  background check's handles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:19:33 +07:00
VoiceLessQ ac3982c68a Windows: keep OpenGL for a GPU without Direct3D 12 and for a named adapter (#4150)
Follow-up to #4600, from its review. A start left OpenGL out whenever
Direct3D 12 listed an adapter, and WARP, its software adapter, is
always listed. So a GPU without a Direct3D 12 driver, which drew
through OpenGL before, now drew on the CPU. An adapter that
WGPU_ADAPTER_NAME named was left out too when it was an OpenGL one.

OpenGL is now listed when Direct3D 12 lists no hardware adapter and
when WGPU_ADAPTER_NAME is set. The Direct3D 12 check takes the shader
compiler the window does (WGPU_DX12_COMPILER, else FXC).
2026-10-29 23:14:58 +07:00
VoiceLessQ 2f9e72b419 Fix #4150: Windows doesn't start OpenGL unless a start needs it
wgpu's OpenGL backend on Windows keeps a hidden window on a helper
thread that pumps no messages (gfx-rs/wgpu#10504). Windows hands an
input-language change to every UI thread of the process and waits for
each, so switching the keyboard to another layout hung the whole app,
even while it drew with Direct3D 12. OpenGL was started on every
Windows start, as the fallback.

A Windows start now lists Direct3D 12 alone. OpenGL is still listed
where it is the fallback: after a start crashed on an adapter or while
listing them (#2243), after a restart that left an adapter out, and when
Direct3D 12 lists no adapter at all (Windows 7). WGPU_BACKEND still
picks the backends as before.
2026-10-29 21:50:02 +07:00
krosk93 7a79935c10 i18n: add Catalan (ca) localization
Squashed from #4453 onto main.
2026-10-29 13:00:44 +07:00
aiongg e724228e25 docs: update source paths for the moved files 2026-10-26 22:01:25 +00:00
dotCooCoo 64f29d5848 i18n: the message scan skips comments and reads EngineError::Disabled's reason
The message scan read the first argument of every error variant, so
for EngineError::Disabled it read the command id and missed the reason
the status bar shows. It also read error calls inside comments, such as
a commented-out bad(cmd, "..."), as messages that need catalog rows.
The scan now reads Disabled's second argument and removes // and
/* ... */ comments (nested ones included) before it looks for calls. A
// or /* inside a string or character literal does not start a comment.
2026-10-26 12:20:24 +07:00
skylar taylor-barrick 581c79dcb1 M14: distinguish qualification from publication (#4173) 2026-10-25 23:47:58 -04:00
Drew Dibble f6a20c9f56 Web: shortcuts the browser also has run only in the app
Squashed from #4106 onto main.
2026-10-26 09:09:47 +07:00
aiongg 8cc69ed45c CI: one test binary per crate, nextest, line tables only (#3855)
* CI: line tables only for workspace crates, no debug info for dependencies

* CI: one integration-test binary per crate

Each crate's tests/*.rs files become modules of tests/it/main.rs. Files that change
process-wide state (Color Settings, the font database, installed plug-ins, the working
directory), the fuzz sweeps and the test targets the Affinity corpus workflow names stay
their own binaries.

* Docs: name the integration tests' new paths

* CI: xtask test with nextest and doctests, one wasm check, clippy --keep-going

cargo xtask ci runs the tests with cargo nextest (cargo test when it is not installed),
builds them with --lib --bins --tests, runs the doctests as their own step, and checks
the wasm crates in one cargo check --keep-going call.
2026-10-23 21:36:10 -04:00
dotCooCoo 8fa918b30b Pen tablets: a pen's eraser end selects the Eraser on Linux under X11 and XWayland
On Linux under X11, and under XWayland, the X server lists a pen's
eraser end as a pointer device of its own, and winit 0.30 hands it to
the window as a mouse. Turning the pen over and dragging the eraser
end drew with the active tool, for example a Paintbrush stroke.

The tablet reader now marks a pen device whose name or XInput type
contains "eraser", and Services::stylus carries the pen's end with
its pressure. Once a frame while no press is held and the pointer is
in the window, the canvas selects the Eraser when the eraser end
moves, and it selects the tool used before when the tip moves again.
The return goes through Session::switch_tool, so a perspective grid
hidden meanwhile stays hidden. A tool chosen while the eraser end
stands in stays when the tip comes back. The feed starts afresh when
the pen turns over, so a press of one end does not take the pressure
the other end last touched with. Native Wayland is unchanged.

The switch follows PhotoCraft's sync_eraser_tool
(storytold/photocraft#255, and storytold/photocraft#5043 for the
cleared tool).

Docs: docs/development.md, docs/gaps.md, docs/hardware-parity.md,
docs/target-app-parity.md.
2026-10-24 03:09:06 +07:00
aiongg cb06c7b34e i18n: missing translations never fail; xtask ci prints one report (#3856)
* i18n tests: report missing translations instead of failing

The scans for untranslated menu strings, tl! literals, undo labels, menu labels and status
messages print what a complete language lacks. A missing translation shows the English
text until a translator adds the row, so it no longer fails the gate.

* i18n: one untranslated report in xtask ci; drop one-language wording tests

`i18n::tests::untranslated_report` lists, per language, the menu strings, tl! literals, undo
step names and templates, menu labels, render-site labels, status and error messages,
PostScript error meanings and default swatch names its catalog lacks; strings every language
lacks are listed once. It never fails on a gap, only on a scan that finds too few strings.
`cargo xtask ci` runs it in an `i18n-report` step, and `cargo xtask i18n-report` runs it alone.

The five scan tests, the render-site and swatch coverage tests and untranslated_messages.txt
fold into the report. Tests that pinned one language's wording are gone; where they also
checked code (lookups, plural rules, locale tags, menu and History step names, engine
parameter errors), that check stays and compares with the catalog lookup.
2026-10-23 16:01:11 -04:00
dotCooCoo 44b1310f49 Linux: a tablet pen's pressure reaches the tools under X11 and XWayland
On Linux under X11, and under XWayland, winit 0.30 hands a drawing
tablet's pen to the window as a mouse without its pressure. Every pen
stroke reached the tools at full pressure: a Calligraphic brush with
Size on Pressure drew one width, and the Liquify tools' Use Pressure
Pen applied full intensity.

When the window is on X11, the desktop app now reads XInput2 raw
events on a second X connection (x11rb's RustConnection, without
unsafe). A device with an "Abs Pressure" valuator is a pen, unless
its XInput type is TOUCHPAD or TOUCHSCREEN. Its pressure, scaled from
the valuator's range to 0..1, goes into Services::stylus, and another
pointer moving clears it. The canvas uses that pressure when a frame
has no touch force. A press takes the highest pressure of the pen's
latest touch since the canvas last read the feed, and waits up to
5 ms for the touch of a hovering pen. The moves and the release of a
held press keep the pressure the pen last touched with when its lift
has already arrived. Native Wayland is unchanged.

The valuator mapping and the reader come from PhotoCraft's tablet
crate (storytold/photocraft#255), with the pressure axis only.

Docs: README.md, docs/development.md, docs/hardware-parity.md,
docs/target-app-parity.md.
2026-10-23 11:31:17 +07:00
Drew DibbleandClaude Opus 5.5 317ca00ccc UI: an embedder of the egui panels binds their font families without shipping their faces
The panels and dialogs draw in their own egui families (`ui`,
`ui-semibold`, `mono`), and egui panics drawing text in a family no
font is bound to. Only `theme::install_fonts` binds them, and only
`VectorcraftApp::logic` calls it, on its first frame. An embedder that
draws the panels or dialogs itself (`dialogs::show`, a panel's `ui`)
on its own context, without `logic`, panics on the first semibold
title it draws, an effect dialog's for one. Calling `install_fonts`
avoids that, but it embeds the interface's five faces (about 2 MB)
whatever the embedder wants: today such an embedder keeps them out of
its binary only by never calling it, so that the linker drops them.

vectorcraft-ui-egui gets an `interface-fonts` feature, on by default,
that embeds those faces. Without it `install_fonts` binds the same
three families to egui's built-in fonts, so an embedder can always
call it. Those lack some symbols the panels show (→ ▾ ● ✓), which the
docs say. With the feature, `install_fonts` installs exactly what it
did before: the same font data and the same family stacks.

`tests/install_fonts.rs` draws an effect dialog on a context only
`install_fonts` prepared, and checks the face at the head of each
family in both configurations. `cargo xtask ci`'s `no-bundled-fonts`
step runs it without default features and lints the crate that way.
Without the `install_fonts` call, or without the semibold binding,
both tests fail with egui's "FontFamily::Name(\"ui-semibold\") is not
bound to any fonts". The two lib tests about the interface faces are
adjusted: the graphics-loss test checks a family install_fonts binds,
and the catalogs' glyph coverage test needs `interface-fonts`.
docs/development.md says when an embedder calls `install_fonts`, and
that it replaces the context's font definitions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:46:06 +07:00