add suggestive fallback messages on unavailable fonts

as per https://github.com/jwilm/alacritty/issues/39
This commit is contained in:
Tom Crayford 2017-01-08 21:31:57 +00:00 committed by Joe Wilm
parent f85cc353a6
commit 67aba7f4e4
2 changed files with 4 additions and 2 deletions

View File

@ -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")

View File

@ -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")