Skip to content

Commit

Permalink
feat: expose remove API to wasm32
Browse files Browse the repository at this point in the history
  • Loading branch information
zimond committed Sep 26, 2023
1 parent 27d54ef commit 3d9bf58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ impl FontKit {
}
}
}

pub fn remove(&self, key: &FontKey) {
self.fonts.remove(key);
}
}

impl FontKit {
Expand Down Expand Up @@ -232,10 +236,6 @@ impl FontKit {
self.fonts.values().find(|font| font.key == *key)
}

pub fn remove(&self, key: &FontKey) {
self.fonts.remove(key);
}

pub fn query(&self, key: &FontKey) -> Option<impl Deref<Target = Font> + '_> {
let mut filters = vec![
Filter::Family(&key.family),
Expand Down

0 comments on commit 3d9bf58

Please sign in to comment.