1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 15:04:36 +03:00

font-config: cut over to new matcher

refs: https://github.com/wez/wezterm/issues/655
This commit is contained in:
Wez Furlong 2021-04-07 22:29:10 -07:00
parent 7fb485d4ff
commit a8281e4984

View File

@ -1,5 +1,6 @@
use crate::fcwrap;
use crate::locator::{FontDataHandle, FontLocator};
use crate::parser::FontMatch;
use anyhow::Context;
use config::FontAttributes;
use fcwrap::{CharSet, Pattern as FontPattern};
@ -53,7 +54,7 @@ impl FontLocator for FontConfigFontLocator {
// so we need to parse the returned font
// here to see if we got what we asked for.
if let Ok(parsed) = crate::parser::ParsedFont::from_locator(&handle) {
if crate::parser::font_info_matches(attr, parsed.names()) {
if parsed.matches_attributes(attr) != FontMatch::NoMatch {
fonts.push(handle);
loaded.insert(attr.clone());
log::trace!("found font-config match for {:?}", parsed.names());