Update cosmic text to 0.13.2 (#27362)
Related #14222 Release Notes: - This PR updates `cosmic-text` dependency on `gpui` crate from `0.11.2` to 0.13.2`. This decreases RAM usage zed depending on the amount of monospace fonts installed on the system. On Arch Linux with `nerd-fonts` package installed (which provides around 2000 monospaced fonts), it decreases ram usage from ~800mb to around ~300mb. - Updated `cosmic-text` to `0.13.2` on `gpui` crate
This commit is contained in:
@@ -153,7 +153,7 @@ blade-graphics = { workspace = true, optional = true }
|
||||
blade-macros = { workspace = true, optional = true }
|
||||
blade-util = { workspace = true, optional = true }
|
||||
bytemuck = { version = "1", optional = true }
|
||||
cosmic-text = { git = "https://github.com/pop-os/cosmic-text", rev = "542b20c", optional = true }
|
||||
cosmic-text = { version = "0.13.2", optional = true }
|
||||
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7", features = [
|
||||
"source-fontconfig-dlopen",
|
||||
], optional = true }
|
||||
|
||||
@@ -376,15 +376,13 @@ impl CosmicTextSystemState {
|
||||
);
|
||||
offs += run.len;
|
||||
}
|
||||
let mut line = ShapeLine::new_in_buffer(
|
||||
&mut self.scratch,
|
||||
let mut line = ShapeLine::new(
|
||||
&mut self.font_system,
|
||||
text,
|
||||
&attrs_list,
|
||||
cosmic_text::Shaping::Advanced,
|
||||
4,
|
||||
);
|
||||
|
||||
let mut layout = Vec::with_capacity(1);
|
||||
line.layout_to_buffer(
|
||||
&mut self.scratch,
|
||||
|
||||
Reference in New Issue
Block a user