Auto merge of #24387 - servo:jdm-patch-31, r=jdm

macos: Remove font size attribute from font descriptor.

This attribute isn't present in font-kit, and maybe this will help with #23290?

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24387)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-10-08 00:46:53 -04:00 committed by GitHub
commit e05f0b41ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,16 +102,10 @@ impl FontTemplateData {
// that one.
let attributes: CFDictionary<CFString, CFType> =
CFDictionary::from_CFType_pairs(&[
(
CFString::new("NSFontNameAttribute"),
CFString::new(&*self.identifier).as_CFType(),
),
(
CFString::new("NSFontSizeAttribute"),
CFNumber::from(clamped_pt_size).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]);