Add db_mut method to FontSystem
This commit is contained in:
parent
41468c17a2
commit
af4378d753
2 changed files with 9 additions and 0 deletions
|
|
@ -43,6 +43,10 @@ impl FontSystem {
|
|||
&self.db
|
||||
}
|
||||
|
||||
pub fn db_mut(&mut self) -> &mut fontdb::Database {
|
||||
&mut self.db
|
||||
}
|
||||
|
||||
pub fn get_font(&self, id: fontdb::ID) -> Option<Arc<Font>> {
|
||||
get_font(&self.db, id)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,11 @@ impl FontSystem {
|
|||
&self.db
|
||||
}
|
||||
|
||||
pub fn db_mut(&mut self) -> &mut fontdb::Database {
|
||||
self.font_matches_cache.clear();
|
||||
&mut self.db
|
||||
}
|
||||
|
||||
pub fn into_locale_and_db(self) -> (String, fontdb::Database) {
|
||||
(self.locale, self.db)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue