From ea2e4bf6299049f2d36704a6ba3512d0afbf221a Mon Sep 17 00:00:00 2001 From: Antonio Sokic <5701985+finaler1x@users.noreply.github.com> Date: Fri, 30 Oct 2026 20:09:24 +0100 Subject: [PATCH] Issue #3412: accessibility audit allows missing glyphs without craft-fonts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without CRAFT_FONTS_DIR the Reference view's "▸" has no glyph and egui_kittest panicked, failing the audit on every dev build. It now allows boxes then and records a skip!(Fonts) note; with craft-fonts a missing glyph still fails. --- crates/ui-egui/tests/it/accessibility.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/tests/it/accessibility.rs b/crates/ui-egui/tests/it/accessibility.rs index 04d64f3e5..30196048b 100644 --- a/crates/ui-egui/tests/it/accessibility.rs +++ b/crates/ui-egui/tests/it/accessibility.rs @@ -14,7 +14,14 @@ fn harness(view: ViewMode, right: RightPanel) -> Harness<'static, LightcraftApp> app.ui.left_panel = true; app.ui.view = view; app.ui.right = right; - let mut h = Harness::builder().with_size(vec2(1500.0, 950.0)).build_ui_state( + let mut builder = Harness::builder().with_size(vec2(1500.0, 950.0)); + // text such as "▸" in the Reference view's hint has its glyph only in the craft-fonts faces (releases + // always have them): without them it is drawn as a box, which this audit of names doesn't need + if lightcraft_engine::CRAFT_FONTS.is_empty() { + lightcraft_testkit::skip!(Fonts, "built without CRAFT_FONTS_DIR: glyphs only craft-fonts has are drawn as boxes, not checked"); + builder = builder.allow_missing_glyphs(); + } + let mut h = builder.build_ui_state( |ui, app: &mut LightcraftApp| { app.logic(&ui.ctx().clone()); app.ui(ui);