mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-01 05:57:09 -06:00
Issue #3412: accessibility audit allows missing glyphs without craft-fonts
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user