mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use NativeFontHandle instead of CGFont
This commit is contained in:
parent
c4b1033b17
commit
13dd197c96
1 changed files with 3 additions and 2 deletions
|
@ -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()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue