mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Fix some mac font bustage
This commit is contained in:
parent
9e17f1334c
commit
0bae84c985
2 changed files with 5 additions and 5 deletions
|
@ -38,7 +38,6 @@ fn with_test_native_font(f: fn@(nf: &NativeFont)) {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore(cfg(target_os = "macos"))]
|
||||
fn should_get_glyph_indexes() {
|
||||
with_test_native_font(|font| {
|
||||
let idx = font.glyph_index('w');
|
||||
|
@ -47,7 +46,6 @@ fn should_get_glyph_indexes() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore(cfg(target_os = "macos"))]
|
||||
fn should_return_none_glyph_index_for_bad_codepoints() {
|
||||
with_test_native_font(|font| {
|
||||
let idx = font.glyph_index(0 as char);
|
||||
|
@ -56,19 +54,21 @@ fn should_return_none_glyph_index_for_bad_codepoints() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore(cfg(target_os = "macos"))]
|
||||
#[ignore(target_os = "macos")]
|
||||
fn should_get_glyph_h_advance() {
|
||||
with_test_native_font(|font| {
|
||||
let adv = font.glyph_h_advance(40u);
|
||||
error!("%?", adv);
|
||||
assert adv == Some(15);
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore(cfg(target_os = "macos"))]
|
||||
#[ignore(target_os = "macos")]
|
||||
fn should_return_none_glyph_h_advance_for_bad_codepoints() {
|
||||
with_test_native_font(|font| {
|
||||
let adv = font.glyph_h_advance(-1 as uint);
|
||||
error!("%?", adv);
|
||||
assert adv == None;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ fn create(buf: &~[u8]) -> Result<QuartzNativeFont, ()> {
|
|||
let fontprov = vec::as_buf(*buf, |cbuf, len| {
|
||||
CGDataProviderCreateWithData(
|
||||
null(),
|
||||
unsafe { transmute(&cbuf) },
|
||||
unsafe { transmute(copy cbuf) },
|
||||
len as size_t,
|
||||
null())
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue