aboutsummaryrefslogtreecommitdiff
path: root/src/style/font/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/style/font/mod.rs')
-rw-r--r--src/style/font/mod.rs25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/style/font/mod.rs b/src/style/font/mod.rs
index 99c3ca6..305978f 100644
--- a/src/style/font/mod.rs
+++ b/src/style/font/mod.rs
@@ -6,24 +6,37 @@
///
/// Thus we need different mechanism for the font implementation
-#[cfg(all(not(target_arch = "wasm32"), feature = "ttf"))]
+#[cfg(all(
+ not(all(target_arch = "wasm32", not(target_os = "wasi"))),
+ feature = "ttf"
+))]
mod ttf;
-#[cfg(all(not(target_arch = "wasm32"), feature = "ttf"))]
+#[cfg(all(
+ not(all(target_arch = "wasm32", not(target_os = "wasi"))),
+ feature = "ttf"
+))]
use ttf::FontDataInternal;
-#[cfg(all(not(target_arch = "wasm32"), not(feature = "ttf")))]
+#[cfg(all(
+ not(all(target_arch = "wasm32", not(target_os = "wasi"))),
+ not(feature = "ttf")
+))]
mod naive;
-#[cfg(all(not(target_arch = "wasm32"), not(feature = "ttf")))]
+#[cfg(all(
+ not(all(target_arch = "wasm32", not(target_os = "wasi"))),
+ not(feature = "ttf")
+))]
use naive::FontDataInternal;
-#[cfg(target_arch = "wasm32")]
+#[cfg(all(target_arch = "wasm32", not(target_os = "wasi")))]
mod web;
-#[cfg(target_arch = "wasm32")]
+#[cfg(all(target_arch = "wasm32", not(target_os = "wasi")))]
use web::FontDataInternal;
mod font_desc;
pub use font_desc::*;
+/// Represents a box where a text label can be fit
pub type LayoutBox = ((i32, i32), (i32, i32));
pub trait FontData: Clone {