Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
linux: Fix wrong names reported by `all_font_names` (#14865)
张小白f3ad75439678
diff --git a/crates/gpui/src/platform/linux/text_system.rs b/crates/gpui/src/platform/linux/text_system.rsindex dc7bf6ca5f9..b32f826e2d4 100644--- a/crates/gpui/src/platform/linux/text_system.rs+++ b/crates/gpui/src/platform/linux/text_system.rs@@ -64,13 +64,17 @@ impl PlatformTextSystem for CosmicTextSystem {}fn all_font_names(&self) -> Vec<String> {- self.0+ let mut result = self+ .0.read().font_system.db().faces()- .map(|face| face.post_script_name.clone())- .collect()+ .filter_map(|face| face.families.first().map(|family| family.0.clone()))+ .collect_vec();+ result.sort();+ result.dedup();+ result}fn all_font_families(&self) -> Vec<String> {