mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 11:51:05 +01:00
Fixes main's red Linux gate leg 1 (`panels::glyphs::tests::east_asian_glyph_forms_in_the_panel_menu_set_the_selected_characters_form`, `glyphs/tests.rs:243`). It was a real bug on every platform. The test skips without the craft fonts, so only Linux CI ran it. **Cause.** The Glyphs panel menu's East Asian glyph form rows read the selection's faces from a cache that only the shown panel's `show` filled. With the panel hidden, the cache was empty, and the "unknown" arm enabled every form, so JIS 2004 was offered for a font with no `jp04`. Production always read the faces when it built the items (prod `panels/glyphs.rs:1407`, `:1492`). **Fix.** `form_faces` returns the cached faces while their key is current and reads them otherwise, as `symbols::instance_flags` does. The unknown-means-enabled arm is gone. `refresh_form_faces` runs from the menu rebuild next to `symbols::cache_instances`, so the faces are read once per change of document, selection or fonts, whether or not the panel is shown. Checks: `vectorcraft-ui-egui` lib tests 3779 passed, 0 failed, with `CRAFT_FONTS_DIR` set so the glyph tests run in full. Clippy (`-D warnings`, all targets) and `cargo fmt --check` are clean.