mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Rename Au methods with f32/f64 instead of frac32/frac/subpx
This commit is contained in:
parent
32d5e24922
commit
8b522f2e7d
23 changed files with 99 additions and 99 deletions
|
@ -36,13 +36,13 @@ use azure::scaled_font::FontInfo;
|
|||
#[cfg(any(target_os="linux", target_os = "android"))]
|
||||
fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFont {
|
||||
ScaledFont::new(BackendType::Skia, FontInfo::FontData(&template.bytes),
|
||||
pt_size.to_subpx() as AzFloat)
|
||||
pt_size.to_f64_px() as AzFloat)
|
||||
}
|
||||
|
||||
#[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();
|
||||
ScaledFont::new(BackendType::Skia, &cgfont, pt_size.to_subpx() as AzFloat)
|
||||
ScaledFont::new(BackendType::Skia, &cgfont, pt_size.to_f64_px() as AzFloat)
|
||||
}
|
||||
|
||||
static SMALL_CAPS_SCALE_FACTOR: f32 = 0.8; // Matches FireFox (see gfxFont.h)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue