diff --git a/crates/ui-egui/src/tests/font_menu.rs b/crates/ui-egui/src/tests/font_menu.rs index 3b330fa3e0..2045e85976 100644 --- a/crates/ui-egui/src/tests/font_menu.rs +++ b/crates/ui-egui/src/tests/font_menu.rs @@ -134,12 +134,20 @@ fn a_face_without_hinting_instructions_draws_its_sample() { fixture.settle(); let texts = fixture.texts().iter().map(|t| t.text.clone()).collect::>(); let (fixture_has_glyph, nonempty_glyph) = *sample.lock().unwrap(); - tx.send((texts, fixture.ctx().global_style().visuals.text_options.font_hinting, fixture_has_glyph, nonempty_glyph)).ok() + let ctx = fixture.ctx(); + let hinting = [ + ctx.global_style().visuals.text_options.font_hinting, + ctx.style_of(egui::Theme::Light).visuals.text_options.font_hinting, + ctx.style_of(egui::Theme::Dark).visuals.text_options.font_hinting, + ]; + tx.send((texts, hinting, fixture_has_glyph, nonempty_glyph)).ok() }); - let (texts, hinting, fixture_has_glyph, nonempty_glyph) = + let (texts, [hinting, light_hinting, dark_hinting], fixture_has_glyph, nonempty_glyph) = rx.recv_timeout(std::time::Duration::from_secs(300)).unwrap_or_else(|e| panic!("drawing the sample: {e}")); assert!(texts.iter().any(|t| t == "\u{5d1}"), "the sample is the letter, in the face: {texts:?}"); assert!(!hinting, "a context the app adopts draws text without hinting"); + assert!(!light_hinting, "the light theme draws text without hinting"); + assert!(!dark_hinting, "the dark theme draws text without hinting"); assert!(fixture_has_glyph, "the sample's face maps U+05D1"); assert!(nonempty_glyph, "the sample is one rasterized glyph for U+05D1"); }