Skip to content

Commit 8f2deea

Browse files
fontique: Make an explicit feature for unicode_script. (#73)
Despite the crate name using a hyphen, the feature uses an underscore to make it match the other Linebender crate features.
1 parent 3268c22 commit 8f2deea

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

fontique/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ default = ["system"]
1717
std = ["skrifa/std", "peniko/std", "dep:memmap2"]
1818
libm = ["skrifa/libm", "peniko/libm", "dep:core_maths"]
1919
icu_properties = ["dep:icu_properties"]
20+
unicode_script = ["dep:unicode-script"]
2021
# Enables support for system font backends
2122
system = ["std"]
2223

fontique/src/script.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Script {
3232
}
3333

3434
/// Returns the associated [`unicode_script::Script`] value.
35-
#[cfg(feature = "unicode-script")]
35+
#[cfg(feature = "unicode_script")]
3636
pub fn unicode_script(self) -> Option<unicode_script::Script> {
3737
unicode_script::Script::from_short_name(core::str::from_utf8(&self.0).ok()?)
3838
}
@@ -80,7 +80,7 @@ impl From<icu_properties::Script> for Script {
8080
}
8181
}
8282

83-
#[cfg(feature = "unicode-script")]
83+
#[cfg(feature = "unicode_script")]
8484
impl From<unicode_script::Script> for Script {
8585
fn from(value: unicode_script::Script) -> Self {
8686
Self(value.short_name().as_bytes().try_into().unwrap_or_default())

0 commit comments

Comments
 (0)