Skip to content

Commit

Permalink
font-config: cut over to new matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
wez committed Apr 8, 2021
1 parent 7fb485d commit a8281e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wezterm-font/src/locator/font_config.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit a8281e4

Please sign in to comment.