From b94615b3eb0a62db429954c112cc5119e42a64e1 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 7 Oct 2019 12:04:53 -0400 Subject: [PATCH 1/2] macos: Remove font size attribute from font descriptor. --- components/gfx/platform/macos/font_template.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/components/gfx/platform/macos/font_template.rs b/components/gfx/platform/macos/font_template.rs index d5ae5138872..1544f6d9c66 100644 --- a/components/gfx/platform/macos/font_template.rs +++ b/components/gfx/platform/macos/font_template.rs @@ -108,10 +108,6 @@ impl FontTemplateData { CFString::new("NSFontNameAttribute"), CFString::new(&*self.identifier).as_CFType(), ), - ( - CFString::new("NSFontSizeAttribute"), - CFNumber::from(clamped_pt_size).as_CFType(), - ), ]); let descriptor = font_descriptor::new_from_attributes(&attributes); From 35f19102974d3db5bf3b27e667a6c44248e35a04 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 7 Oct 2019 15:05:48 -0400 Subject: [PATCH 2/2] rustfmt --- components/gfx/platform/macos/font_template.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/components/gfx/platform/macos/font_template.rs b/components/gfx/platform/macos/font_template.rs index 1544f6d9c66..9d9f1fab7a9 100644 --- a/components/gfx/platform/macos/font_template.rs +++ b/components/gfx/platform/macos/font_template.rs @@ -6,7 +6,6 @@ use app_units::Au; use core_foundation::array::CFArray; use core_foundation::base::{CFType, TCFType}; use core_foundation::dictionary::CFDictionary; -use core_foundation::number::CFNumber; use core_foundation::string::CFString; use core_graphics::data_provider::CGDataProvider; use core_graphics::font::CGFont; @@ -103,12 +102,10 @@ impl FontTemplateData { // that one. let attributes: CFDictionary = - CFDictionary::from_CFType_pairs(&[ - ( - CFString::new("NSFontNameAttribute"), - CFString::new(&*self.identifier).as_CFType(), - ), - ]); + CFDictionary::from_CFType_pairs(&[( + CFString::new("NSFontNameAttribute"), + CFString::new(&*self.identifier).as_CFType(), + )]); let descriptor = font_descriptor::new_from_attributes(&attributes); let descriptors = CFArray::from_CFTypes(&[descriptor]);