mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Make freetype code build
This commit is contained in:
parent
839ce9c867
commit
192d1ca069
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
||||||
#[legacy_exports];
|
#[legacy_exports];
|
||||||
export FreeTypeNativeFont, with_test_native_font, create;
|
export FreeTypeNativeFont, with_test_native_font, create;
|
||||||
|
|
||||||
|
use font::{FontMetrics, FractionalPixel};
|
||||||
|
|
||||||
use util::*;
|
use util::*;
|
||||||
use vec_as_buf = vec::as_imm_buf;
|
use vec_as_buf = vec::as_imm_buf;
|
||||||
use ptr::{addr_of, null};
|
use ptr::{addr_of, null};
|
||||||
|
@ -69,6 +71,7 @@ impl FreeTypeNativeFont {
|
||||||
assert slot.is_not_null();
|
assert slot.is_not_null();
|
||||||
let advance = (*slot).metrics.horiAdvance;
|
let advance = (*slot).metrics.horiAdvance;
|
||||||
debug!("h_advance for %? is %?", glyph, advance);
|
debug!("h_advance for %? is %?", glyph, advance);
|
||||||
|
let advance = advance as i32;
|
||||||
return Some(fixed_to_float_ft(advance) as FractionalPixel);
|
return Some(fixed_to_float_ft(advance) as FractionalPixel);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -84,9 +87,10 @@ impl FreeTypeNativeFont {
|
||||||
underline_offset: 0.0,
|
underline_offset: 0.0,
|
||||||
leading: 0.0,
|
leading: 0.0,
|
||||||
x_height: 0.0,
|
x_height: 0.0,
|
||||||
|
em_size: gfx::geometry::au(0),
|
||||||
|
em_height: 0.0,
|
||||||
em_ascent: 0.0,
|
em_ascent: 0.0,
|
||||||
em_descent: 0.0,
|
em_descent: 0.0,
|
||||||
em_height: 0.0,
|
|
||||||
max_advance: 0.0
|
max_advance: 0.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue