diff options
Diffstat (limited to 'font')
-rw-r--r-- | font/Cargo.toml | 2 | ||||
-rw-r--r-- | font/src/darwin/mod.rs | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/font/Cargo.toml b/font/Cargo.toml index e111cbdf..6666f058 100644 --- a/font/Cargo.toml +++ b/font/Cargo.toml @@ -6,7 +6,7 @@ description = "Font rendering using the best available solution per platform" license = "Apache-2.0" [dependencies] -euclid = "0.13" +euclid = "0.16" libc = "0.2" foreign-types = "0.3" log = "0.3" diff --git a/font/src/darwin/mod.rs b/font/src/darwin/mod.rs index 53f78e4b..97f02553 100644 --- a/font/src/darwin/mod.rs +++ b/font/src/darwin/mod.rs @@ -38,9 +38,7 @@ use core_text::font_descriptor::kCTFontVerticalOrientation; use core_text::font_descriptor::{CTFontDescriptor, CTFontDescriptorRef, CTFontOrientation}; use core_text::font_descriptor::SymbolicTraitAccessors; -use euclid::point::Point2D; -use euclid::rect::Rect; -use euclid::size::Size2D; +use euclid::{Point2D, Rect, Size2D}; use super::{FontDesc, RasterizedGlyph, Metrics, FontKey, GlyphKey}; @@ -309,7 +307,7 @@ fn cascade_list_for_languages( ) -> Vec<Descriptor> { // convert language type &Vec<String> -> CFArray - let langarr:CFArray = { + let langarr:CFArray<CFString> = { let tmp:Vec<CFString> = languages.iter() .map(|language| CFString::new(&language)) .collect(); @@ -317,7 +315,7 @@ fn cascade_list_for_languages( }; // CFArray of CTFontDescriptorRef (again) - let list = ct_cascade_list_for_languages(ct_font, &langarr); + let list = ct_cascade_list_for_languages(ct_font, &langarr.as_untyped()); // convert CFArray to Vec<Descriptor> list.into_iter() |