forked from 1b-agent/opencadstudio-upstream
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:
1 parent
6ef399d83b
commit
629cdd2834
1 file changed
+5
@@ -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")]
|
||||
|
||||
Reference in new issue
Block a user