From bb8c2c787608746cf9c8edb427f221d54c148e7b Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 20 Feb 2019 22:02:12 -0800 Subject: [PATCH] adjust windows font fallback I still can't get the emoji to render on windows, but these font names are more appropriate choices. --- src/config.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 2998d96b3..09d47a299 100644 --- a/src/config.rs +++ b/src/config.rs @@ -108,7 +108,9 @@ impl Default for Config { #[cfg(target_os = "macos")] const FONT_FAMILY: &str = "Menlo"; -#[cfg(not(target_os = "macos"))] +#[cfg(windows)] +const FONT_FAMILY: &str = "Consolas"; +#[cfg(all(not(target_os = "macos"), not(windows)))] const FONT_FAMILY: &str = "monospace"; #[derive(Debug, Deserialize, Clone, PartialEq, Eq, Hash)] @@ -235,7 +237,12 @@ impl TextStyle { }); #[cfg(windows)] font.push(FontAttributes { - family: "Segoe UI".into(), + family: "Segoe UI Emoji".into(), + bold: None, + italic: None, + }); + font.push(FontAttributes { + family: "Segoe UI Symbol".into(), bold: None, italic: None, });