fix: no redundant load

This commit is contained in:
Itsusinn 2024-05-02 08:08:27 +08:00 committed by Jeremy Soller
parent 658025314c
commit 1f52b5211c

View file

@ -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
})