From 27ef18ec2ce9c4ed9b5b71fa4480094a891d591f Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sun, 11 Oct 2026 13:14:30 -0400 Subject: [PATCH] symbol_glyphs test: compare against a private-use code point no font covers (review fix-up for #298) U+25FB is a real glyph in DejaVu, so the test could pass while symbols still rendered as boxes. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/tests/symbol_glyphs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/tests/symbol_glyphs.rs b/crates/ui-egui/tests/symbol_glyphs.rs index 5e98dae..7f2a55f 100644 --- a/crates/ui-egui/tests/symbol_glyphs.rs +++ b/crates/ui-egui/tests/symbol_glyphs.rs @@ -22,7 +22,8 @@ fn ui_symbols_have_glyphs_when_a_symbol_face_is_installed() { let galley = ctx.fonts_mut(|f| f.layout_no_wrap(text.to_owned(), font.clone(), Color32::BLACK)); galley.rows.iter().flat_map(|r| r.glyphs.iter().map(|g| (g.chr, g.uv_rect))).collect::>() }; - let tofu: Vec<_> = glyphs("\u{25FB}").into_iter().map(|(_, uv)| uv).collect(); + // A private-use code point no font covers renders as the replacement box. + let tofu: Vec<_> = glyphs("\u{10FFFD}").into_iter().map(|(_, uv)| uv).collect(); let missing: String = glyphs(UI_SYMBOLS).into_iter().filter(|(_, uv)| tofu.contains(uv)).map(|(c, _)| c).collect(); assert!(missing.is_empty(), "these interface symbols render as boxes in {:?}: {missing}", font.family); }