1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-29 16:42:13 +03:00

don't fail if lcd filtering is not supported

This was happening on a fedora based distro
This commit is contained in:
Wez Furlong 2018-02-22 22:14:33 -08:00
parent 43e752bb60
commit 64c0873ba3

View File

@ -255,7 +255,13 @@ impl NamedFontImpl {
/// Construct a new Font from the user supplied pattern
pub fn new(mut pattern: FontPattern) -> Result<Self, Error> {
let mut lib = ftwrap::Library::new()?;
lib.set_lcd_filter(ftwrap::FT_LcdFilter::FT_LCD_FILTER_DEFAULT)?;
// Some systems don't support this mode, so if it fails, we don't
// care to abort the rest of what we're doing
match lib.set_lcd_filter(ftwrap::FT_LcdFilter::FT_LCD_FILTER_DEFAULT) {
Ok(_) => (),
Err(err) => eprintln!("FT_LcdFilter failed: {:?}", err),
};
// Enable some filtering options and pull in the standard
// fallback font selection from the user configuration