Add FontSystem::into_locale_and_db for std system

This commit is contained in:
Audrey Dutcher 2022-12-28 11:21:57 -08:00 committed by Jeremy Soller
parent 92b3758909
commit 58d292a6f1

View file

@ -85,6 +85,11 @@ impl FontSystem {
self.0.borrow_db()
}
pub fn into_locale_and_db(self) -> (String, fontdb::Database) {
let heads = self.0.into_heads();
(heads.locale, heads.db)
}
// Clippy false positive
#[allow(clippy::needless_lifetimes)]
pub fn get_font<'a>(&'a self, id: fontdb::ID) -> Option<Arc<Font<'a>>> {