Skip to content

Commit

Permalink
Use NativeFontHandle instead of CGFont
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredoyang authored and gw3583 committed Apr 21, 2017
1 parent c4b1033 commit 13dd197
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/gfx/platform/macos/font_template.rs
Expand Up @@ -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
Expand Down Expand Up @@ -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()))
}
}

Expand Down

0 comments on commit 13dd197

Please sign in to comment.