Rename Au methods with f32/f64 instead of frac32/frac/subpx

This commit is contained in:
Simon Sapin 2015-05-05 18:23:29 +02:00
parent 32d5e24922
commit 8b522f2e7d
23 changed files with 99 additions and 99 deletions

View file

@ -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)