Skip to content

Commit

Permalink
fix: no redundant load
Browse files Browse the repository at this point in the history
  • Loading branch information
Itsusinn authored and jackpot51 committed Jun 5, 2024
1 parent 6580253 commit 1f52b52
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/font/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ impl FontSystem {
.filter(|id| {
let contains = self.font_cache.contains_key(id);
#[cfg(feature = "std")]
unsafe {
self.db.make_shared_face_data(*id);
if !contains {
unsafe {
self.db.make_shared_face_data(*id);
}
}
!contains
})
Expand Down

0 comments on commit 1f52b52

Please sign in to comment.