From 629cdd2834c1f726a0068206ba5c28ec13125987 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sat, 17 Oct 2026 20:03:15 +0300 Subject: [PATCH] Text: TrueType fonts in the Fonts folder resolve like installed ones Only system-installed TrueType fonts were searched, so a style naming a .ttf placed in the Fonts folder fell back to another face, although SHX fonts there already resolved. The folder is now loaded with the system fonts. Refs #925 Co-Authored-By: Claude Opus 5.5 --- src/scene/text/sysfont.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scene/text/sysfont.rs b/src/scene/text/sysfont.rs index ae0b3ed96..0003e55b7 100644 --- a/src/scene/text/sysfont.rs +++ b/src/scene/text/sysfont.rs @@ -37,6 +37,11 @@ fn fonts() -> &'static SysFonts { let db = { let mut db = fontdb::Database::new(); db.load_system_fonts(); + // TrueType files dropped into the Fonts folder resolve like + // installed ones, as the folder's SHX fonts already do (#925). + if let Some(dir) = crate::io::font_repo::fonts_dir() { + db.load_fonts_dir(dir); + } db }; #[cfg(target_arch = "wasm32")]