From 5467e4e87fe856ed931b319bdd97b10564b15a76 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 13 Nov 2026 13:00:39 -0800 Subject: [PATCH] Tests: the floating Character font wheel test turns off missing glyph protection The test's second and third wheel turns step to whichever families the process has loaded at that moment. When another test has loaded a test font without Latin glyphs, such as Alias Jointest Sans from the Glyphs panel tests, the turn applies it, missing glyph protection keeps "Hi" in Source Serif 4, and the assert_ne at the second turn fails. The test now turns the preference off, as the font menu tests in tests/font_menu.rs do, so each turn changes the text's font whatever family it reaches. --- crates/ui-egui/src/panel_docking/native_tests.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ui-egui/src/panel_docking/native_tests.rs b/crates/ui-egui/src/panel_docking/native_tests.rs index 2f1d0d536c..368f7ebae8 100644 --- a/crates/ui-egui/src/panel_docking/native_tests.rs +++ b/crates/ui-egui/src/panel_docking/native_tests.rs @@ -1039,6 +1039,9 @@ fn ui_docking_leaves_out_the_controls_of_os_windows() { #[test] fn wheel_over_a_floating_character_font_field_changes_the_font() { let mut h = Harness::new(); + // The later turns step to whichever families the process has loaded, test fonts without Latin + // glyphs included. Missing glyph protection would keep the text in its previous font. + h.app.run("prefs.set", json!({"key": "missingGlyphProtection", "value": false})).unwrap(); h.app.run("text.create", json!({"x": 30, "y": 50, "text": "Hi", "font": "Source Sans 3"})).unwrap(); let viewport = h.float("character"); let field = h