mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
gfx: Instantiate the CTFont
corresponding to a Mac font on demand.
This avoids panics in multiprocess mode.
This commit is contained in:
parent
1ff7a51f0a
commit
e9ec9289d6
3 changed files with 18 additions and 8 deletions
|
@ -42,7 +42,7 @@ fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFo
|
|||
|
||||
#[cfg(target_os="macos")]
|
||||
fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFont {
|
||||
let cgfont = template.ctfont.as_ref().unwrap().copy_to_CGFont();
|
||||
let cgfont = template.ctfont().as_ref().unwrap().copy_to_CGFont();
|
||||
ScaledFont::new(BackendType::Skia, &cgfont, pt_size.to_f32_px())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue