The test compared the shared shortcut editor snapshot before and after the
steps. Another test switching languages can replace that snapshot after the
app's catalog was built, so the refresh rebuilt the catalog while the guard
saw no change and the assertion failed. The guard now starts from the
snapshot the app's catalog holds.
The catalog's generation hashed the Scripts menu's revision and the font
database's generation. Each startup step that moved either one (the Scripts
note before the first listing, the listing itself, the font scan) made the
catalog's rows again and built the window's keymap again, even when the rows
were the same. On a fresh start that happened three times in the first
frames.
The catalog is now kept when its rows are unchanged: the rows the scripts
and fonts add are compared as rows, and the catalog's generation hashes each
row's key, label and kind. A menu that shows or hides an item the rows
already have no longer moves the generation either.
On Windows (release build, fresh settings folder, 3 runs), the UI thread's
work in frames 0 to 2 went from a median of 226 ms to 130 ms, and catalog and
keymap builds in the first 6 seconds went from 4 to 2.
A right-button release on a chip set the stroke even when the press began
elsewhere, so a right-drag from empty space onto a chip changed the stroke.
The strip now remembers the chip (by document and paint) that a right
press landed on and sets the stroke only when the release lands on that
chip. Presses on a layer covering a chip, and the invisible sizing pass of
a measuring container, do not count, and a chip that moves in the list
between press and release still does.
Since the move to the craft font catalog, the global catalog asked the
platform's font service (DirectWrite on Windows, CoreText on macOS) and
also ran the app's platform lister, which lists the same fonts again.
On Windows the font service opens and maps every installed face, so the
background font scan did that work twice at every start.
set_platform_font_files_complete sets a lister that lists every font
the font service lists. The catalog then reads the lister's files and
does not ask the font service. set_platform_font_files keeps adding to
the font service as before. The desktop app and vectorcraft-cli install
their Windows and macOS listers with the new call; both listers already
read DirectWrite's system collection (plus GDI's fonts) and CoreText's
available fonts.
The lint leg's dependency cache keeps no compiled workspace crates, so on
a pull request `cargo test -p vectorcraft-ui-egui --no-default-features
--test install_fonts` rebuilt every workspace crate without the bundled
fonts: 35 of the lint leg's 60 minutes, and the longest leg of the run.
`cargo xtask ci` splits its no-bundled-fonts step in two. The
`no-bundled-fonts` step (the `cargo tree` checks and the clippy run
without default features) stays in `cargo xtask ci checks`. The new
`no-bundled-fonts-tests` step runs the two tests, and the new
`cargo xtask ci after-archive` runs it after the doctests in the gate's
build job, whose rolling cache entry keeps the workspace crates. The
tests' builds record their units in CRAFT_CACHE_UNITS, so the cache trim
keeps the crates built without the fonts.
The CMYK fields of a script's picker now convert through the CMYK profile
of the script's document whenever one is given, not only in a CMYK
document, matching the gamut warning. An RGB color opens through the
active RGB profile, which the picker's RGB fields read its channel values
in, so the opening swatch and the fields agree. docs/mcp.md names the
profiles the picker uses.
File > Open refuses an RTF file that ends inside a group as damaged
instead of opening the text read before the end; File > Place still
places that text. Binary data and bytes after the document's closing
brace are skipped, as the reader skips them.
Text Import Options for a file File > Open asks about now waits while
any dialog is open, as Missing Fonts does, so the two never show at
once.
The File > Open filter test uses the extensions and formats this build
reads, so it holds where no DWG decoder is built in.
When a late files read finds no copied files and the Copy made here was
a bitmap, Paste read the bitmap to compare it with the Copy before it
read the text. A bitmap read that gets no answer leaves the clipboard
worker busy, so the text read then failed at once and Paste took the
internal Copy instead of the text another app put there. The text is
now read first and kept for the paste.
docs/mcp.md's Width profiles section says which commands the footer's
Add to Profiles, Delete Profile and Reset Profiles run, and the
progress doc gets a line for the footer with its tests.
The ProfileSelect doc comment named another vendor's app; it now says
what the drop-down holds. The closed and open widths, the Page Up/Down
step and the saved-row thumbnail size are documented consts, and the
thumbnail's size and inset are no longer literals at their call sites.
The framework's Select, which the Profile control used before, reports
the picked row's place in the list as a numeric value and takes
AccessKit's SetValue, Increment and Decrement. The new drop-down set
only a text value and never read take_set_value, so a screen reader
could no longer step or set the profile. ProfileSelect::access now sets
access.numeric with the row's place and label, and update takes
SetValue and the step moves before its focus check, as Select does.
The Gujarati status notes now give the catalog's real counts: 4,946 `@msg`
rows and 10,890 rows in all, and the revision rows give 4,926 new message
rows. They also say that a web build offers Gujarati only when it is built
with `CRAFT_FONTS_DIR` pointing at a craft-fonts checkout that has Noto Sans
Gujarati; without it `offered_codes` leaves `gu` out on the web.
docs/development.md no longer says a missing translation never fails a test.
It names the four tests that need a row in every complete catalog or every
`COMPLETE_MESSAGES` language.
app.showColorPicker opened the picker with the front document's color
profiles: the opening color, the CMYK fields and the out-of-gamut test
used the active context, while OK converted the pick through the
script's document. With two documents assigned different profiles, the
picker showed and separated colors in the wrong space.
The script picker now draws its opening color, fills its CMYK fields
and tests the gamut through the profiles of the script's document.
Pickers opened from the panels keep using the active profiles.
The clip-outline check behind `pathItems.removeAll()` measured each
subpath by its signed area. The loops of a figure eight turn opposite
ways and cancel, so the check treated the outline as enclosing nothing,
although both fill rules fill it. A subpath whose signed area is within
roundoff of zero is now measured by the area it fills under nonzero.
A subpath whose points all lie on one line still encloses nothing.
The Concept to Vector panel labels its slider and field with tl!("Detail"),
and gu.tsv had a row only for "Detail:", so the label stayed in English
in the Gujarati interface.
When a late text read answers and the Copy made here was a bitmap, Paste
read the bitmap to compare before it read copied files. A bitmap read that
got no answer left the worker busy, so the files' read failed at once and
an art-file list on the clipboard was not pasted. Paste now reads copied
files first whenever the ownership check needs a read of its own, since a
Copy made here writes no files.
The doc comment on Ours now states that a bitmap is known by its size, as
Clipboard::owns already compares it, and the test covers a same-size bitmap
from another app.
The footer's Add to Profiles saved the profile at once as "Width Profile
N". It now opens the same name dialog as the Stroke panel's menu item
Add to Profiles…, as on main, and saves nothing until OK.
stroke.widthProfile.move, Prefs::width_profile_order, the drag and Move
Up/Move Down reordering, stroke.widthProfile.rename and the row menu's
Rename item are taken out, along with their tests, so this change holds
the drop-down footer alone. Reordering and renaming go to their own pull
requests. Dragging a row onto the footer's trash button goes with the
row drag. The engine's width profile commands are now the same as on
main.
A saved row's right-click menu keeps Delete Profile; built-in rows have
no menu.