Skip to content

Commit

Permalink
make bold, bold_italic and italic evictable as well
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Sep 16, 2024
1 parent dcbec29 commit adf1579
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sugarloaf/src/components/rich_text/image_cache/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn buffer_size(width: u32, height: u32) -> Option<usize> {
.checked_add(4)
}

pub const SIZE: u16 = 1024;
pub const SIZE: u16 = 2048;

impl ImageCache {
/// Creates a new image cache.
Expand Down
8 changes: 4 additions & 4 deletions sugarloaf/src/font/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
}
}
}
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit adf1579

Please sign in to comment.