From cc87390edee9d28d9e7456c6ac0cf3a6b7a096c2 Mon Sep 17 00:00:00 2001 From: Joe Moon Date: Wed, 7 Feb 2018 08:53:58 -0800 Subject: fix fallbacks in macos (#1099) fixes #1086 --- font/src/darwin/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'font') diff --git a/font/src/darwin/mod.rs b/font/src/darwin/mod.rs index feadd3f4..14381113 100644 --- a/font/src/darwin/mod.rs +++ b/font/src/darwin/mod.rs @@ -326,6 +326,7 @@ fn cascade_list_for_languages( pub fn descriptors_for_family(family: &str) -> Vec { let mut out = Vec::new(); + info!("family: {}", family); let ct_collection = match create_for_family(family) { Some(c) => c, None => return out, @@ -349,7 +350,7 @@ impl Descriptor { let fallbacks = if load_fallbacks { descriptors_for_family("Menlo") .into_iter() - .filter(|d| d.family_name == "Menlo Regular") + .filter(|d| d.font_name == "Menlo-Regular") .nth(0) .map(|descriptor| { let menlo = ct_new_from_descriptor(&descriptor.ct_descriptor, size); -- cgit v1.2.3