servo/components/fonts/Cargo.toml
Narfinger 4d35b69ffe
Clean up unused dependencies / features and centralize more feature selection into root Cargo.toml (#37720)
- Make feature flag of smallvec global.
- Removed unused dependency of thinvec.
- Removed unused flag of hyper-util.

Reduces the binary size by an astonishing 3.352k.

Testing: Compilation 'tests' this change.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2025-06-26 11:56:48 +00:00

79 lines
2.4 KiB
TOML

[package]
name = "fonts"
version.workspace = true
authors.workspace = true
license.workspace = true
edition.workspace = true
publish.workspace = true
rust-version.workspace = true
[lib]
name = "fonts"
path = "lib.rs"
test = true
doctest = false
[features]
tracing = ["dep:tracing"]
[dependencies]
app_units = { workspace = true }
atomic_refcell = { workspace = true }
base = { workspace = true }
bitflags = { workspace = true }
compositing_traits = { workspace = true }
euclid = { workspace = true }
fnv = { workspace = true }
fonts_traits = { workspace = true }
fontsan = { git = "https://github.com/servo/fontsan" }
# FIXME (#34517): macOS only needs this when building libservo without `--features media-gstreamer`
harfbuzz-sys = { workspace = true, features = ["bundled"] }
ipc-channel = { workspace = true }
itertools = { workspace = true }
libc = { workspace = true }
log = { workspace = true }
malloc_size_of = { workspace = true }
malloc_size_of_derive = { workspace = true }
memmap2 = { workspace = true }
net_traits = { workspace = true }
num-traits = { workspace = true }
parking_lot = { workspace = true }
profile_traits = { workspace = true }
read-fonts = { workspace = true }
range = { path = "../range" }
serde = { workspace = true }
servo_arc = { workspace = true }
servo_config = { path = "../config" }
servo_url = { path = "../url" }
smallvec = { workspace = true }
stylo = { workspace = true }
stylo_atoms = { workspace = true }
tracing = { workspace = true, optional = true }
unicode-properties = { workspace = true }
unicode-script = { workspace = true }
url = { workspace = true }
webrender_api = { workspace = true }
servo-tracing = { workspace = true }
[target.'cfg(target_os = "macos")'.dependencies]
byteorder = { workspace = true }
core-foundation = "0.9"
core-graphics = "0.23"
core-text = "20.1"
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
freetype-sys = { workspace = true }
servo_allocator = { path = "../allocator" }
[target.'cfg(all(target_os = "linux", not(target_env = "ohos")))'.dependencies]
fontconfig_sys = { package = "yeslogic-fontconfig-sys", version = "6" }
[target.'cfg(target_os = "android")'.dependencies]
xml-rs = "0.8"
[target.'cfg(target_os = "windows")'.dependencies]
dwrote = "0.11.2"
truetype = { version = "0.47.3", features = ["ignore-invalid-language-ids"] }
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ohos_mock)'] }