diff --git a/sugarloaf/src/components/rich_text/image_cache/cache.rs b/sugarloaf/src/components/rich_text/image_cache/cache.rs index 672fc3da48..e56b9a6be9 100644 --- a/sugarloaf/src/components/rich_text/image_cache/cache.rs +++ b/sugarloaf/src/components/rich_text/image_cache/cache.rs @@ -38,7 +38,7 @@ pub fn buffer_size(width: u32, height: u32) -> Option { .checked_add(4) } -pub const SIZE: u16 = 1024; +pub const SIZE: u16 = 2048; impl ImageCache { /// Creates a new image cache. diff --git a/sugarloaf/src/font/mod.rs b/sugarloaf/src/font/mod.rs index ff5cb193fd..3703034399 100644 --- a/sugarloaf/src/font/mod.rs +++ b/sugarloaf/src/font/mod.rs @@ -127,7 +127,7 @@ impl Default for FontLibraryData { Self { ui: FontArc::try_from_slice(FONT_CASCADIAMONO_REGULAR).unwrap(), inner: FxHashMap::default(), - stash: LruCache::new(NonZeroUsize::new(2).unwrap()), + stash: LruCache::new(NonZeroUsize::new(3).unwrap()), } } } @@ -265,7 +265,7 @@ impl FontLibraryData { } } - match find_font(&db, spec.italic, false, false) { + match find_font(&db, spec.italic, true, false) { FindResult::Found(data) => { self.insert(data); } @@ -277,7 +277,7 @@ impl FontLibraryData { } } - match find_font(&db, spec.bold, false, false) { + match find_font(&db, spec.bold, true, false) { FindResult::Found(data) => { self.insert(data); } @@ -289,7 +289,7 @@ impl FontLibraryData { } } - match find_font(&db, spec.bold_italic, false, false) { + match find_font(&db, spec.bold_italic, true, false) { FindResult::Found(data) => { self.insert(data); }