Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Use embedded bitmaps in fonts on Linux (#55202)
John Ture5db37f7d07a
diff --git a/crates/gpui_wgpu/src/cosmic_text_system.rs b/crates/gpui_wgpu/src/cosmic_text_system.rsindex c664ca9449f..24fa7172c3a 100644--- a/crates/gpui_wgpu/src/cosmic_text_system.rs+++ b/crates/gpui_wgpu/src/cosmic_text_system.rs@@ -302,7 +302,15 @@ impl CosmicTextSystemState {}Ok((bitmap_size, image.data))}- swash::scale::image::Content::Mask => Ok((bitmap_size, image.data)),+ swash::scale::image::Content::Mask => {+ if params.subpixel_rendering {+ // We must always return RGBA data when subpixel rendering is requested.+ let expanded = image.data.iter().flat_map(|&a| [a, a, a, a]).collect();+ Ok((bitmap_size, expanded))+ } else {+ Ok((bitmap_size, image.data))+ }+ }}}@@ -333,7 +341,7 @@ impl CosmicTextSystemState {Source::Outline,]} else {- &[Source::Outline]+ &[Source::Bitmap(StrikeWith::ExactSize), Source::Outline]};let mut renderer = Render::new(sources);