This commit is contained in:
Antonio Scandurra 2023-10-21 18:33:08 +02:00
parent 7bb99c9b9c
commit 3740c9d852
3 changed files with 9 additions and 2 deletions

View file

@ -55,6 +55,10 @@ impl TextSystem {
}
}
pub fn add_fonts(&self, fonts: &[Arc<Vec<u8>>]) -> Result<()> {
self.platform_text_system.add_fonts(fonts)
}
pub fn font_id(&self, font: &Font) -> Result<FontId> {
let font_id = self.font_ids_by_font.read().get(font).copied();
if let Some(font_id) = font_id {