Merge pull request #187 from hecrj/respect-fontconfig-aliases

Respect `fontconfig` font aliases when enabled
This commit is contained in:
Jeremy Soller 2023-09-18 12:24:05 -06:00 committed by GitHub
commit 4a6c388ce2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,13 +58,14 @@ impl FontSystem {
log::debug!("Locale: {}", locale);
let mut db = fontdb::Database::new();
Self::load_fonts(&mut db, fonts.into_iter());
//TODO: configurable default fonts
db.set_monospace_family("Fira Mono");
db.set_sans_serif_family("Fira Sans");
db.set_serif_family("DejaVu Serif");
Self::load_fonts(&mut db, fonts.into_iter());
Self::new_with_locale_and_db(locale, db)
}