#8813 tops up the font list with fonts renamed `Menu Test Font NN` on runners
with 20 or fewer families, but vectorcraft_testkit::fonts::renamed only takes
a 13-byte family (the length of "Source Sans 3"). Every run that reaches the
loop panics, as the coverage shard on main does. `Menu Test FNN` is 13 bytes.
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: BFlat <bombayapirat@gmail.com>
Each shape votes for every face it fits, and each glyph is set in the face
with the most votes. When faces tied, each glyph took its own closest face,
so one line could be set in several fonts. With Noto Sans CJK SC loaded,
simplified Source Sans 3 outlines of "Tim" fit both faces (and Noto Sans
Hebrew) three times each: T and m took Source Sans 3 and i took Noto Sans
CJK SC, so T and m were left as lone outlines.
A tie now goes to the face with the least leftover distance summed over the
shapes that fit it, so every glyph that fits that face takes it.
Every gate since 20 Nov 00:38 UTC except one has been stopped mid-link
with "The runner has received a shutdown signal" (exit 143), on main and
on pull requests. Turn on the shared gate's dev-strip input, as photocraft
does, so the ~100 test binaries link without line tables or symbols.
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Near matching ranked every glyph of the shape's contour count and proportion
before comparing the 256 closest, and that ranking was not counted against the
point comparisons each shape and command may make, so a large selection over
many fonts could spend unbounded time there. Each glyph ranked now takes one
comparison per contour and one more from the same budget, the ranking keeps
the closest glyphs without sorting the rest, and the shares of contour length
are read without allocating per glyph.
The gate's one job builds all 106 test binaries on a 4-CPU, 16 GB runner,
and it is often stopped with exit code 143 ("The runner has received a
shutdown signal") during that build. ci.yml now runs the gate as five
legs:
- Shards 1 to 4 run `cargo xtask ci shard`, which builds and runs the
tests and doctests of its own crates: ui-egui, engine, the apps with
mcp and xtask, and every other crate.
- Shard 5 runs the other `cargo xtask ci` steps.
- On pushes to main, a `cache warm` leg runs `cargo xtask ci warm`,
which builds what every shard builds and saves the dependency cache.
`gate (ubuntu-24.04)` passes only when all five legs passed.
`cargo xtask ci` with no argument runs every step, as before.
`cargo xtask shards` lists each shard's crates. It fails when a crate
named in xtask/src/shards.rs is not a workspace member or is named
twice, and when a crate builds with other features in its shard than in
`cargo test --workspace`. Every shard runs it first. vectorcraft-affinity
and vectorcraft-pdf now turn on `synth` and `read-count` in their own
dev-dependencies, which vectorcraft-engine's dev-dependencies turned on
before. Without that, 39 tests of affinity's `it` binary do not build in
a shard without the engine.
The gate also sets dev-debug "0" and dev-strip: true, so the workspace
crates build without line tables and the test binaries without debug
info or symbols.
The glyphs of a split compound path can become separate type objects, for
example on two lines. A compound filled by the nonzero rule whose glyphs
overlap passed the paint check, and with an opacity below 100% the two objects
then painted the overlap twice. A split whose parts overlap now keeps the shape
an outline when the shape has an opacity below 100%, a blend mode other than
Normal, a gradient or pattern fill or a stroke.
Splitting a compound path copies its contours and compares each with the
others. A selected compound of a few contours with a very large number of path
elements was split however many elements it had. Such a shape is now matched
whole only, like one of more than 256 groups or 512 contours.
A near-matched glyph joins a line when its size and turn are each within the
tolerance of the line's, and the line's type then draws it at the line's size
and turn. Together with the glyph's own leftover distance, that change could
put the drawn glyph further from its shape than the tolerance: an m 4% larger
and turned 0.04 radians stayed on its line at tolerance 0.05.
The layout check now also measures, for each near-matched glyph (and each glyph
of a line whose first glyph is one), how far the change from its matched size
and turn moves the drawn outline relative to its spread, combined with its own
leftover distance, and splits the line before it when that passes the
tolerance, or when the glyph's center sits further away than its origin may.
* eps: delegate scene-writer shading, image stream, and line style syntax to craft-ps
* chore(eps): repin craft-ps to merged craft-libs main (cfcc86242)
- eps: restore linear-time memchr::memmem::find in lex::find so
search_in_a_loop_runs_out_of_the_budget does not hit O(N*M) under
craft_ps::read::lex::find.
- ui-egui: wait for FontDb background scan and ensure >20 font families
in menu_access_stationary_pointer_repeat_and_rerun_do_not_retarget_or_double_invoke
so coverage/minimal runners do not race or fall short of 20 families.
A compound path whose split with the longest runs and split with the shortest
runs both failed the paint check stayed an outline, even when another complete
split (AB and CD for groups A, B, C and D) passed it. The split search now
checks the other complete splits in order, at most 32 per shape for exact
matches and 32 for near matches, and looks each run of groups up at most once,
only when the search reaches it.
Lines that a compound path of several glyphs splits into share that
shape, so the check that one line's shape comes right after the last
line's never passed for them, and each line stayed an object of its own.
Two lines of one shape now follow each other, and the other joining
rules decide as for lines of separate shapes. The lines of the existing
paint-order test are moved farther apart so they still make two objects.
A line of two glyphs that untracked type does not draw in place takes the
tracking of the nearest tracked line in the same font, size and turn, and
keeps it only when type at that tracking draws both glyphs in place. A line
of one or two glyphs that joins tracked lines in one object takes their
tracking. The Retype row in docs/type-parity.md said other lines are set
untracked.
A contour counts as lying inside another only when up to eight of its anchor points do. When the paint check rejects the split with the longest runs, the split with the shortest runs is tried before the shape stays an outline.
The fill check rejects a counter whose convex hull is narrower than three times the outline tolerance in some direction, so a turned strip is caught as well as an upright one, and rejects a shape whose outline is too large to flatten. Exact parts of a split compound are checked at tolerance 0 even when near matches are allowed, so a split that only exact matching found is not accepted under the wider tolerance. The tracking sentence in docs/type-parity.md names its three-glyph condition.
A negative tracking candidate for glyphs that do not paint as one object returned the untracked line and discarded the best tracked reading found from an earlier seed. It now skips that candidate and tries the next.