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]
|
#[test]
|
||||||
#[ignore(cfg(target_os = "macos"))]
|
|
||||||
fn should_get_glyph_indexes() {
|
fn should_get_glyph_indexes() {
|
||||||
with_test_native_font(|font| {
|
with_test_native_font(|font| {
|
||||||
let idx = font.glyph_index('w');
|
let idx = font.glyph_index('w');
|
||||||
|
@ -47,7 +46,6 @@ fn should_get_glyph_indexes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore(cfg(target_os = "macos"))]
|
|
||||||
fn should_return_none_glyph_index_for_bad_codepoints() {
|
fn should_return_none_glyph_index_for_bad_codepoints() {
|
||||||
with_test_native_font(|font| {
|
with_test_native_font(|font| {
|
||||||
let idx = font.glyph_index(0 as char);
|
let idx = font.glyph_index(0 as char);
|
||||||
|
@ -56,19 +54,21 @@ fn should_return_none_glyph_index_for_bad_codepoints() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore(cfg(target_os = "macos"))]
|
#[ignore(target_os = "macos")]
|
||||||
fn should_get_glyph_h_advance() {
|
fn should_get_glyph_h_advance() {
|
||||||
with_test_native_font(|font| {
|
with_test_native_font(|font| {
|
||||||
let adv = font.glyph_h_advance(40u);
|
let adv = font.glyph_h_advance(40u);
|
||||||
|
error!("%?", adv);
|
||||||
assert adv == Some(15);
|
assert adv == Some(15);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore(cfg(target_os = "macos"))]
|
#[ignore(target_os = "macos")]
|
||||||
fn should_return_none_glyph_h_advance_for_bad_codepoints() {
|
fn should_return_none_glyph_h_advance_for_bad_codepoints() {
|
||||||
with_test_native_font(|font| {
|
with_test_native_font(|font| {
|
||||||
let adv = font.glyph_h_advance(-1 as uint);
|
let adv = font.glyph_h_advance(-1 as uint);
|
||||||
|
error!("%?", adv);
|
||||||
assert adv == None;
|
assert adv == None;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ fn create(buf: &~[u8]) -> Result<QuartzNativeFont, ()> {
|
||||||
let fontprov = vec::as_buf(*buf, |cbuf, len| {
|
let fontprov = vec::as_buf(*buf, |cbuf, len| {
|
||||||
CGDataProviderCreateWithData(
|
CGDataProviderCreateWithData(
|
||||||
null(),
|
null(),
|
||||||
unsafe { transmute(&cbuf) },
|
unsafe { transmute(copy cbuf) },
|
||||||
len as size_t,
|
len as size_t,
|
||||||
null())
|
null())
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue