From 67aba7f4e4758c5fcb7eda50f083b138017fbfdb Mon Sep 17 00:00:00 2001 From: Tom Crayford Date: Sun, 8 Jan 2017 21:31:57 +0000 Subject: [PATCH] add suggestive fallback messages on unavailable fonts as per https://github.com/jwilm/alacritty/issues/39 --- font/src/darwin/mod.rs | 3 ++- font/src/ft/mod.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/font/src/darwin/mod.rs b/font/src/darwin/mod.rs index 69a9f29..1f925de 100644 --- a/font/src/darwin/mod.rs +++ b/font/src/darwin/mod.rs @@ -111,7 +111,8 @@ impl ::std::fmt::Display for Error { write!(f, "Glyph not found for char {:?}", c) }, Error::MissingFont(ref desc) => { - write!(f, "Couldn't find a font with {}", desc) + write!(f, "Couldn't find a font with {}\ + \n\tPlease check the font config in your alacritty.yml.", desc) }, Error::FontNotLoaded => { f.write_str("Tried to use a font that hasn't been loaded") diff --git a/font/src/ft/mod.rs b/font/src/ft/mod.rs index f9170ed..6fdae4b 100644 --- a/font/src/ft/mod.rs +++ b/font/src/ft/mod.rs @@ -252,7 +252,8 @@ impl ::std::fmt::Display for Error { err.fmt(f) }, Error::MissingFont(ref desc) => { - write!(f, "Couldn't find a font with {}", desc) + write!(f, "Couldn't find a font with {}\ + \n\tPlease check the font config in your alacritty.yml.", desc) }, Error::FontNotLoaded => { f.write_str("Tried to use a font that hasn't been loaded")