summaryrefslogtreecommitdiffstats
path: root/gfx/webrender_bindings/src/moz2d_renderer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/webrender_bindings/src/moz2d_renderer.rs')
-rw-r--r--gfx/webrender_bindings/src/moz2d_renderer.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/gfx/webrender_bindings/src/moz2d_renderer.rs b/gfx/webrender_bindings/src/moz2d_renderer.rs
index 4c7a32c912..ca1e76f96f 100644
--- a/gfx/webrender_bindings/src/moz2d_renderer.rs
+++ b/gfx/webrender_bindings/src/moz2d_renderer.rs
@@ -33,16 +33,16 @@ use std::sync::Arc;
#[cfg(target_os = "windows")]
use dwrote;
-#[cfg(target_os = "macos")]
+#[cfg(any(target_os = "macos", target_os = "ios"))]
use core_foundation::string::CFString;
-#[cfg(target_os = "macos")]
+#[cfg(any(target_os = "macos", target_os = "ios"))]
use core_graphics::font::CGFont;
-#[cfg(target_os = "macos")]
+#[cfg(any(target_os = "macos", target_os = "ios"))]
use foreign_types::ForeignType;
-#[cfg(not(any(target_os = "macos", target_os = "windows")))]
+#[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "windows")))]
use std::ffi::CString;
-#[cfg(not(any(target_os = "macos", target_os = "windows")))]
+#[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "windows")))]
use std::os::unix::ffi::OsStrExt;
/// Local print-debugging utility
@@ -787,7 +787,7 @@ impl Moz2dBlobImageHandler {
unsafe { AddNativeFontHandle(key, face.as_ptr() as *mut c_void, 0) };
}
- #[cfg(target_os = "macos")]
+ #[cfg(any(target_os = "macos", target_os = "ios"))]
fn process_native_font_handle(key: FontKey, handle: &NativeFontHandle) {
let font = match CGFont::from_name(&CFString::new(&handle.name)) {
Ok(font) => font,
@@ -804,7 +804,7 @@ impl Moz2dBlobImageHandler {
unsafe { AddNativeFontHandle(key, font.as_ptr() as *mut c_void, 0) };
}
- #[cfg(not(any(target_os = "macos", target_os = "windows")))]
+ #[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "windows")))]
fn process_native_font_handle(key: FontKey, handle: &NativeFontHandle) {
let cstr = CString::new(handle.path.as_os_str().as_bytes()).unwrap();
unsafe { AddNativeFontHandle(key, cstr.as_ptr() as *mut c_void, handle.index) };