From 38595ca3fd0ded35aa816b06677ae61990db4f9c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 21 Nov 2026 08:52:26 -0800 Subject: [PATCH] Font menu: the Document filter test holds other tests' font changes back the_document_filter_lists_the_families_the_documents_type_uses lists every family, turns the Document filter on and off, and expects the same list again. A composite font that a test running alongside registers in the process-wide font database in between shows up at the top of the second list, and the test fails. The test now holds test_fonts::steady_fonts on the global database from before its first listing, so those changes wait until it ends. --- crates/ui-egui/src/font_menu/tests.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ui-egui/src/font_menu/tests.rs b/crates/ui-egui/src/font_menu/tests.rs index e6dbdcca4e..930417a808 100644 --- a/crates/ui-egui/src/font_menu/tests.rs +++ b/crates/ui-egui/src/font_menu/tests.rs @@ -1176,6 +1176,9 @@ fn the_document_filter_lists_the_families_the_documents_type_uses() { app.run("object.lock", serde_json::json!({})).unwrap(); app.run("text.create", serde_json::json!({"x": 20, "y": 150, "text": "Missing", "font": "Missing Family 7059"})).unwrap(); let db = vectorcraft_text::FontDb::global(); + // Tests running alongside register composite fonts and load fonts in the process-wide database; + // their changes wait until this test ends, so both listings of every family are the same. + let _steady = vectorcraft_text::test_fonts::steady_fonts(db); let used = super::document_families(db, &app.session.active().unwrap().doc); let mut names: Vec<_> = used.iter().cloned().collect(); names.sort();