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 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-17 20:03:15 +03:00
1 parent 6ef399d83b
commit 629cdd2834
1 file changed
+5
+5
View File
@@ -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")]