diff --git a/fontique/Cargo.toml b/fontique/Cargo.toml index f2c61f3e..cbec6063 100644 --- a/fontique/Cargo.toml +++ b/fontique/Cargo.toml @@ -17,6 +17,7 @@ default = ["system"] std = ["skrifa/std", "peniko/std", "dep:memmap2"] libm = ["skrifa/libm", "peniko/libm", "dep:core_maths"] icu_properties = ["dep:icu_properties"] +unicode_script = ["dep:unicode-script"] # Enables support for system font backends system = ["std"] diff --git a/fontique/src/script.rs b/fontique/src/script.rs index 9ab47791..6662ce48 100644 --- a/fontique/src/script.rs +++ b/fontique/src/script.rs @@ -32,7 +32,7 @@ impl Script { } /// Returns the associated [`unicode_script::Script`] value. - #[cfg(feature = "unicode-script")] + #[cfg(feature = "unicode_script")] pub fn unicode_script(self) -> Option { unicode_script::Script::from_short_name(core::str::from_utf8(&self.0).ok()?) } @@ -80,7 +80,7 @@ impl From for Script { } } -#[cfg(feature = "unicode-script")] +#[cfg(feature = "unicode_script")] impl From for Script { fn from(value: unicode_script::Script) -> Self { Self(value.short_name().as_bytes().try_into().unwrap_or_default())