From 835474d5b034efd9eaf2749802fa352a9279235e Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Tue, 19 May 2026 01:10:03 -0600 Subject: [PATCH] build(qbz-slint): switch Slint renderer from femtovg to Skia MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit femtovg's text rendering looks coarse next to native Qt/KDE. The slint dependency now uses default-features = false with renderer-skia (plus backend-winit, renderer-software fallback, accessibility, compat-1-2). Pulls skia-safe — first build is slower and the binary grows ~6 MB, both expected and accepted. cc --- crates/Cargo.lock | 134 +----------------------------------- crates/qbz-slint/Cargo.toml | 13 +++- 2 files changed, 14 insertions(+), 133 deletions(-) diff --git a/crates/Cargo.lock b/crates/Cargo.lock index 28eb62fcb..b0736d86f 100644 --- a/crates/Cargo.lock +++ b/crates/Cargo.lock @@ -1450,53 +1450,6 @@ dependencies = [ "windows 0.62.2", ] -[[package]] -name = "cpp" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f6422bf20bc0654eac481a29a03e6d9121ad9f12345a03773b8a76a8701915" -dependencies = [ - "cpp_macros", -] - -[[package]] -name = "cpp_build" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f6fed3200ba0708c2adca5f6ed5ae202edd824bd4cbac7935a85edac9bcddce" -dependencies = [ - "cc", - "cpp_common", - "proc-macro2", - "regex", - "syn", - "unicode-xid", -] - -[[package]] -name = "cpp_common" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7280a73ef92e18d27d2ec3005b57fe0043b51d1b506be86b0bf66f588f9857b" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "cpp_macros" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc7fd49a5b246251229ea4d4bf94c8d418689a1f9986ef96e00b64992922169" -dependencies = [ - "aho-corasick", - "byteorder", - "cpp_common", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "cpufeatures" version = "0.2.17" @@ -2157,27 +2110,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "femtovg" -version = "0.19.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5d925785ad33d7b0ae2b445d9f157c3ab42ff3c515fff0b46d53d4a86c43c5" -dependencies = [ - "bitflags 2.11.0", - "bytemuck", - "fnv", - "glow", - "image", - "imgref", - "itertools 0.14.0", - "log", - "rgb", - "slotmap", - "ttf-parser 0.25.1", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "field-offset" version = "0.3.6" @@ -2232,12 +2164,6 @@ dependencies = [ "spin", ] -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "foldhash" version = "0.1.5" @@ -2952,7 +2878,7 @@ dependencies = [ "glutin", "i-slint-common", "i-slint-core", - "i-slint-renderer-femtovg", + "i-slint-renderer-skia", "input", "memmap2", "nix 0.30.1", @@ -2960,25 +2886,6 @@ dependencies = [ "xkbcommon", ] -[[package]] -name = "i-slint-backend-qt" -version = "1.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c946891ff0bfa95a5944c7cfc18828b8e123edea1168301f1e1b5505aa82933e" -dependencies = [ - "const-field-offset", - "cpp", - "cpp_build", - "i-slint-common", - "i-slint-core", - "i-slint-core-macros", - "lyon_path", - "pin-project", - "pin-weak", - "qttypes", - "vtable", -] - [[package]] name = "i-slint-backend-selector" version = "1.14.1" @@ -2987,7 +2894,6 @@ checksum = "e138660c634d6bbdf98bb2d0cfa487cda28e032e133a2a2c974f1cc494198765" dependencies = [ "cfg-if", "i-slint-backend-linuxkms", - "i-slint-backend-qt", "i-slint-backend-winit", "i-slint-common", "i-slint-core", @@ -3013,7 +2919,6 @@ dependencies = [ "i-slint-common", "i-slint-core", "i-slint-core-macros", - "i-slint-renderer-femtovg", "i-slint-renderer-skia", "imgref", "lyon_path", @@ -3133,29 +3038,6 @@ dependencies = [ "syn", ] -[[package]] -name = "i-slint-renderer-femtovg" -version = "1.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d85d77f899ecb1f05c50c659a6d356fba44463686713f1f925c8be48de6afb" -dependencies = [ - "cfg-if", - "const-field-offset", - "derive_more", - "femtovg", - "glow", - "i-slint-common", - "i-slint-core", - "i-slint-core-macros", - "imgref", - "lyon_path", - "pin-weak", - "rgb", - "ttf-parser 0.25.1", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "i-slint-renderer-skia" version = "1.14.1" @@ -5594,17 +5476,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "qttypes" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7edf5b38c97ad8900ad2a8418ee44b4adceaa866a4a3405e2f1c909871d7ebd" -dependencies = [ - "cpp", - "cpp_build", - "semver", -] - [[package]] name = "quick-error" version = "2.0.1" @@ -6675,11 +6546,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c35c4bdca2c42c69b21ceb416aa4ba76c3f54df30e9ce85dcad0742229422a6" dependencies = [ "const-field-offset", - "i-slint-backend-qt", "i-slint-backend-selector", "i-slint-core", "i-slint-core-macros", - "i-slint-renderer-femtovg", "num-traits", "once_cell", "pin-weak", @@ -6837,6 +6706,7 @@ checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" dependencies = [ "as-raw-xcb-connection", "bytemuck", + "drm", "fastrand", "js-sys", "memmap2", diff --git a/crates/qbz-slint/Cargo.toml b/crates/qbz-slint/Cargo.toml index b1fbc60ed..086189fb8 100644 --- a/crates/qbz-slint/Cargo.toml +++ b/crates/qbz-slint/Cargo.toml @@ -11,7 +11,18 @@ name = "qbz-slint" path = "src/main.rs" [dependencies] -slint = "1" +# Skia renderer instead of the default femtovg — femtovg's text rendering +# looks coarse next to native Qt/KDE. default-features = false drops +# femtovg; std/accessibility/compat-1-2 are kept from the old default set, +# renderer-software stays as a cheap fallback if Skia fails to init. +slint = { version = "1", default-features = false, features = [ + "std", + "backend-winit", + "renderer-skia", + "renderer-software", + "accessibility", + "compat-1-2", +] } log = { workspace = true } env_logger = "0.11" tokio = { workspace = true }