From 13dd197c96ce334f0026b4b9efc9cde62fe12afa Mon Sep 17 00:00:00 2001 From: alfredoyang Date: Tue, 18 Apr 2017 17:41:14 +0800 Subject: [PATCH] Use NativeFontHandle instead of CGFont --- components/gfx/platform/macos/font_template.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/gfx/platform/macos/font_template.rs b/components/gfx/platform/macos/font_template.rs index 3cd5fecdb01..d731347d798 100644 --- a/components/gfx/platform/macos/font_template.rs +++ b/components/gfx/platform/macos/font_template.rs @@ -18,6 +18,7 @@ use std::fs::File; use std::io::{Read, Error as IoError}; use std::ops::Deref; use std::sync::Mutex; +use webrender_traits::NativeFontHandle; /// Platform specific font representation for mac. /// The identifier is a PostScript font name. The @@ -106,8 +107,8 @@ impl FontTemplateData { } /// Returns the native font that underlies this font template, if applicable. - pub fn native_font(&self) -> Option { - self.ctfont(0.0).map(|ctfont| ctfont.copy_to_CGFont()) + pub fn native_font(&self) -> Option { + self.ctfont(0.0).map(|ctfont| NativeFontHandle(ctfont.copy_to_CGFont())) } }