diff --git a/crates/ui-egui/src/tests/dialog_layout.rs b/crates/ui-egui/src/tests/dialog_layout.rs index d5e5b8ddd0..9911e89750 100644 --- a/crates/ui-egui/src/tests/dialog_layout.rs +++ b/crates/ui-egui/src/tests/dialog_layout.rs @@ -196,17 +196,21 @@ fn dialogs_on_a_short_screen_keep_their_buttons_and_rows_in_reach() { ), ]; // The Keyboard Shortcuts window behind Import Shortcut Set lists the language commands in their own - // scripts, which need the craft-fonts faces. - let deva = vectorcraft_text::CRAFT_FONTS.iter().any(|f| f.has_script("Deva")); + // scripts, which need the craft-fonts faces. A craft-fonts checkout without a Gujarati face (the one + // CI pins) draws the Gujarati name as a box: this test checks where rows stand, not glyph coverage. + let has = |script: &str| vectorcraft_text::CRAFT_FONTS.iter().any(|f| f.has_script(script)); let mut wrong = vec![]; for (name, open, labels, rows, heights) in opens { - if name == "Import Shortcut Set" && !deva { + if name == "Import Shortcut Set" && !has("Deva") { eprintln!("skipped Import Shortcut Set: built without craft-fonts (set CRAFT_FONTS_DIR to a craft-fonts checkout to run it)"); continue; } for &(height, rows_seen) in heights { let screen = Rect::from_min_size(Pos2::ZERO, egui::vec2(1280.0, height)); let mut h = window_in(screen.size()); + if name == "Import Shortcut Set" && !has("Gujr") { + h.ctx.set_missing_glyph_policy(egui::MissingGlyphPolicy::Tofu); + } open(h.state_mut()); for _ in 0..6 { step(&mut h);