Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui: Fix TextStyle default font_family crash on Windows, use `Segoe UI` for Windows (#14040)
Jason Lee15662f105e74
diff --git a/crates/gpui/src/style.rs b/crates/gpui/src/style.rsindex 0ca021f2b2b..8f1ebc8a618 100644--- a/crates/gpui/src/style.rs+++ b/crates/gpui/src/style.rs@@ -212,6 +212,8 @@ impl Default for TextStyle {// todo(linux) make this configurable or choose better defaultfont_family: if cfg!(target_os = "linux") {"FreeMono".into()+ } else if cfg!(target_os = "windows") {+ "Segoe UI".into()} else {"Helvetica".into()},diff --git a/crates/gpui/src/text_system.rs b/crates/gpui/src/text_system.rsindex b884e2ef934..d9afea43f3b 100644--- a/crates/gpui/src/text_system.rs+++ b/crates/gpui/src/text_system.rs@@ -66,6 +66,7 @@ impl TextSystem {// We should allow GPUI users to provide their own fallback font stack.font("Zed Plex Mono"),font("Helvetica"),+ font("Segoe UI"), // Windowsfont("Cantarell"), // Gnomefont("Ubuntu"), // Gnome (Ubuntu)font("Noto Sans"), // KDE