Skip to content

Commit a4278e6

Browse files
committed
feature/fontique: Remove fontdb, adapt glyph embedding code (#9434)
1 parent a3a3844 commit a4278e6

File tree

15 files changed

+239
-599
lines changed

15 files changed

+239
-599
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ clru = { version = "0.6.0" }
146146
css-color-parser2 = { version = "1.0.1" }
147147
derive_more = { version = "2.0.0", default-features = false, features = ["deref", "deref_mut", "into", "from", "add", "add_assign", "mul", "not", "display"] }
148148
euclid = { version = "0.22.1", default-features = false }
149-
fontdb = { version = "0.23.0", default-features = false }
150149
fontdue = { version = "0.9.0" }
151150
glutin = { version = "0.32.0", default-features = false }
152151
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
@@ -172,6 +171,7 @@ glow = { version = "0.16" }
172171
tikv-jemallocator = { version = "0.6" }
173172
wgpu-26 = { package = "wgpu", version = "26", default-features = false }
174173
input = { version = "0.9.0", default-features = false }
174+
fontique = { version = "0.5.0" }
175175

176176
[profile.release]
177177
lto = true

internal/common/Cargo.toml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,11 @@ path = "lib.rs"
1818

1919
[features]
2020
default = []
21-
shared-fontdb = ["dep:fontdb", "dep:libloading", "derive_more", "cfg-if", "dep:ttf-parser"]
2221
shared-fontique = ["dep:fontique", "dep:ttf-parser"]
2322

2423
[dependencies]
25-
fontdb = { workspace = true, optional = true }
2624
ttf-parser = { workspace = true, optional = true }
27-
derive_more = { workspace = true, optional = true }
28-
cfg-if = { version = "1", optional = true }
29-
fontique = { version = "0.5.0", optional = true }
30-
31-
[target.'cfg(not(any(target_family = "windows", target_vendor = "apple", target_arch = "wasm32", target_os = "android")))'.dependencies]
32-
libloading = { version = "0.8.0", optional = true }
33-
34-
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
35-
fontdb = { workspace = true, optional = true, features = ["std", "fs", "fontconfig"] }
36-
37-
[target.'cfg(all(not(target_arch = "wasm32"), not(target_os = "nto")))'.dependencies]
38-
fontdb = { workspace = true, optional = true, features = ["memmap"] }
25+
fontique = { workspace = true, optional = true }
3926

4027
[package.metadata.docs.rs]
4128
rustdoc-args = ["--generate-link-to-definition"]

internal/common/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#![doc = include_str!("README.md")]
55
#![doc(html_logo_url = "https://slint.dev/logo/slint-logo-square-light.svg")]
6-
#![cfg_attr(not(any(feature = "shared-fontdb", feature = "shared-fontique")), no_std)]
6+
#![cfg_attr(not(feature = "shared-fontique"), no_std)]
77

88
pub mod builtin_structs;
99
pub mod enums;
@@ -12,9 +12,6 @@ pub mod key_codes;
1212
#[cfg(feature = "shared-fontique")]
1313
pub mod sharedfontique;
1414

15-
#[cfg(feature = "shared-fontdb")]
16-
pub mod sharedfontdb;
17-
1815
/// Detect the native style depending on the platform
1916
pub fn get_native_style(has_qt: bool, target: &str) -> &'static str {
2017
// NOTE: duplicated in api/cpp/CMakeLists.txt

internal/common/sharedfontdb.rs

Lines changed: 0 additions & 262 deletions
This file was deleted.

0 commit comments

Comments
 (0)