diff --git a/src/servo/text/native_font.rs b/src/servo/text/native_font.rs index a5086f292ce..bdd1dea1b05 100644 --- a/src/servo/text/native_font.rs +++ b/src/servo/text/native_font.rs @@ -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; }) } diff --git a/src/servo/text/native_font/quartz_native_font.rs b/src/servo/text/native_font/quartz_native_font.rs index 9e960272613..1864b3848bf 100644 --- a/src/servo/text/native_font/quartz_native_font.rs +++ b/src/servo/text/native_font/quartz_native_font.rs @@ -131,7 +131,7 @@ fn create(buf: &~[u8]) -> Result { let fontprov = vec::as_buf(*buf, |cbuf, len| { CGDataProviderCreateWithData( null(), - unsafe { transmute(&cbuf) }, + unsafe { transmute(copy cbuf) }, len as size_t, null()) });