Replace rustybuzz with HarfRust (#417)
* Use HarfRust for shaping * Replace ttf-parser with skrifa entirely * Fix clippy lints * Add shape plan cache * Bump harfrust and skrifa * Fix no_std build * Simplify the shape plan cache * Please the paperclip * Cache font ID with plan * Tune shape plan cache for "BiDi Processing" bench
This commit is contained in:
parent
3c1f6c9e8a
commit
2610c869f6
7 changed files with 221 additions and 121 deletions
12
Cargo.toml
12
Cargo.toml
|
|
@ -7,25 +7,25 @@ edition = "2021"
|
|||
license = "MIT OR Apache-2.0"
|
||||
documentation = "https://docs.rs/cosmic-text/latest/cosmic_text/"
|
||||
repository = "https://github.com/pop-os/cosmic-text"
|
||||
rust-version = "1.75"
|
||||
rust-version = "1.80"
|
||||
|
||||
[dependencies]
|
||||
bitflags = "2.4.1"
|
||||
core_maths = { version = "0.1.1", optional = true }
|
||||
cosmic_undo_2 = { version = "0.2.0", optional = true }
|
||||
fontdb = { version = "0.23", default-features = false }
|
||||
harfrust = { version = "0.2.0", default-features = false }
|
||||
hashbrown = { version = "0.14.1", optional = true, default-features = false }
|
||||
libm = { version = "0.2.8", optional = true }
|
||||
log = "0.4.20"
|
||||
modit = { version = "0.1.4", optional = true }
|
||||
rangemap = "1.4.0"
|
||||
rustc-hash = { version = "1.1.0", default-features = false }
|
||||
rustybuzz = { version = "0.14", default-features = false, features = ["libm"] }
|
||||
self_cell = "1.0.1"
|
||||
skrifa = { version = "0.36.0", default-features = false }
|
||||
smol_str = { version = "0.2.2", default-features = false }
|
||||
syntect = { version = "5.1.0", optional = true }
|
||||
sys-locale = { version = "0.3.1", optional = true }
|
||||
ttf-parser = { version = "0.21", default-features = false }
|
||||
unicode-linebreak = "0.1.5"
|
||||
unicode-script = "0.5.5"
|
||||
unicode-segmentation = "1.10.1"
|
||||
|
|
@ -49,16 +49,16 @@ optional = true
|
|||
default = ["std", "swash", "fontconfig"]
|
||||
fontconfig = ["fontdb/fontconfig", "std"]
|
||||
monospace_fallback = []
|
||||
no_std = ["rustybuzz/libm", "hashbrown", "dep:libm", "core_maths"]
|
||||
no_std = ["hashbrown", "dep:libm", "skrifa/libm", "core_maths"]
|
||||
peniko = ["dep:peniko"]
|
||||
shape-run-cache = []
|
||||
std = [
|
||||
"fontdb/memmap",
|
||||
"fontdb/std",
|
||||
"rustybuzz/std",
|
||||
"harfrust/std",
|
||||
"skrifa/std",
|
||||
"swash?/std",
|
||||
"sys-locale",
|
||||
"ttf-parser/std",
|
||||
"unicode-bidi/std",
|
||||
]
|
||||
vi = ["modit", "syntect", "cosmic_undo_2"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue