chore: use cosmic-text shape cache
This commit is contained in:
parent
155f8d20d0
commit
67d3225ef5
3 changed files with 9 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ use std::{
|
|||
|
||||
use cosmic::{
|
||||
iced::{
|
||||
advanced::widget::Tree,
|
||||
advanced::{graphics::text::font_system, widget::Tree},
|
||||
event::Event,
|
||||
futures::{FutureExt, StreamExt},
|
||||
keyboard::{Event as KeyboardEvent, Modifiers as IcedModifiers},
|
||||
|
|
@ -1006,6 +1006,12 @@ where
|
|||
|
||||
Result::<_, ()>::Ok(damage)
|
||||
});
|
||||
|
||||
// trim the shape cache
|
||||
{
|
||||
let mut font_system = font_system().write().unwrap();
|
||||
font_system.raw().shape_run_cache.trim(1024);
|
||||
}
|
||||
}
|
||||
|
||||
match MemoryRenderBufferRenderElement::from_buffer(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue