aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/platform/macos
diff options
context:
space:
mode:
authoralfredoyang <ayang@mozilla.com>2017-04-18 17:41:14 +0800
committerGlenn Watson <github@intuitionlibrary.com>2017-04-21 13:21:25 +1000
commit13dd197c96ce334f0026b4b9efc9cde62fe12afa (patch)
tree492f552b17d0a9c96009a2ea3f8ed7cfd5f94085 /components/gfx/platform/macos
parentc4b1033b17178812cf624f32e35229e0caaf7dd9 (diff)
downloadservo-13dd197c96ce334f0026b4b9efc9cde62fe12afa.tar.gz
servo-13dd197c96ce334f0026b4b9efc9cde62fe12afa.zip
Use NativeFontHandle instead of CGFont
Diffstat (limited to 'components/gfx/platform/macos')
-rw-r--r--components/gfx/platform/macos/font_template.rs5
1 files 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<CGFont> {
- self.ctfont(0.0).map(|ctfont| ctfont.copy_to_CGFont())
+ pub fn native_font(&self) -> Option<NativeFontHandle> {
+ self.ctfont(0.0).map(|ctfont| NativeFontHandle(ctfont.copy_to_CGFont()))
}
}