From 41132c3162a77ee17b230afc6afc35238a24a6eb Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 21 Jun 2026 01:48:37 +0000 Subject: [PATCH 01/48] Upgrade decoupled linebender deps (parley/fontique/skrifa generation) and drop fontique patch Bump Loki's own linebender crates to the latest generation, which is decoupled from the patched, dioxus-0.7.9-pinned blitz/vello stack via the neutral type boundary in loki-layout (parley output is converted to plain f32/u16/raw font bytes before reaching the vello renderer): - loki-layout: parley 0.8 -> 0.10, fontique 0.8 -> 0.10 - loki-ooxml (dev-deps): parley 0.8 -> 0.10, read-fonts 0.37 -> 0.40 - appthere-canvas: read-fonts 0.37 -> 0.40 - loki-text/spreadsheet/presentation: fontique 0.8 -> 0.10 parley 0.10 API migration in loki-layout/src/para.rs: - InlineBox gained a `kind` field (InlineBoxKind::InFlow for tab-stop boxes) - Layout::align now takes (alignment, options); width comes from break_all_lines - LineMetrics min_coord/max_coord -> block_min_coord/block_max_coord Remove the fontique [patch.crates-io] entry and patches/fontique/. fontique 0.10 restores the fontconfig_sys alias that the 0.8.0 crates.io publish dropped, so the patch's primary fix is no longer needed. The dlopen feature-unification concern is handled without a patch by enabling `fontconfig-dlopen` directly on loki-layout's fontique dependency, so crates whose graph excludes blitz-dom (e.g. loki-vello) still link. Cleanups and other low-risk updates: - Remove unused read-fonts/skrifa deps from loki-vello (no references anywhere) - criterion 0.5 -> 0.8 (bench harness), dirs 5 -> 6 (recent-documents) - cargo update refresh of caret deps (loro -> 1.13.1, etc.) The vello/peniko/kurbo/wgpu generation and the blitz+dioxus stack are intentionally left unchanged: their newer releases only exist as blitz 0.3.0-alpha / dioxus 0.8.0-alpha pre-releases, which would require re-vendoring all remaining patches against moving-target alphas. Verified: cargo check --workspace --all-targets, cargo clippy --workspace -- -D warnings, cargo fmt --all --check, and cargo test -p loki-layout (130 passed) all green. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01VQT8nGqwCyAkFGmSCiqYQL --- Cargo.lock | 578 ++++-------- Cargo.toml | 5 - README.md | 1 - appthere-canvas/Cargo.toml | 2 +- docs/fidelity-status.md | 2 +- docs/patches.md | 59 +- loki-layout/Cargo.toml | 11 +- loki-layout/src/para.rs | 14 +- loki-ooxml/Cargo.toml | 4 +- loki-presentation/Cargo.toml | 4 +- loki-spreadsheet/Cargo.toml | 4 +- loki-text/Cargo.toml | 8 +- loki-vello/Cargo.toml | 2 - patches/fontique/.cargo-ok | 1 - patches/fontique/.cargo_vcs_info.json | 6 - patches/fontique/Cargo.lock | 387 -------- patches/fontique/Cargo.toml | 195 ---- patches/fontique/Cargo.toml.orig | 80 -- patches/fontique/LICENSE-APACHE | 201 ---- patches/fontique/LICENSE-MIT | 25 - patches/fontique/README.md | 54 -- patches/fontique/examples/generic_families.rs | 37 - patches/fontique/src/attributes.rs | 42 - patches/fontique/src/backend/android.rs | 221 ----- patches/fontique/src/backend/coretext.rs | 193 ---- patches/fontique/src/backend/dwrite.rs | 397 -------- patches/fontique/src/backend/fontconfig.rs | 838 ----------------- patches/fontique/src/backend/mod.rs | 74 -- patches/fontique/src/charmap.rs | 127 --- patches/fontique/src/collection/mod.rs | 870 ------------------ patches/fontique/src/collection/query.rs | 322 ------- patches/fontique/src/fallback.rs | 287 ------ patches/fontique/src/family.rs | 111 --- patches/fontique/src/family_name.rs | 119 --- patches/fontique/src/font.rs | 480 ---------- patches/fontique/src/generic.rs | 36 - patches/fontique/src/impl_fontconfig.rs | 159 ---- patches/fontique/src/lib.rs | 77 -- patches/fontique/src/matching.rs | 464 ---------- patches/fontique/src/scan.rs | 304 ------ patches/fontique/src/script.rs | 289 ------ patches/fontique/src/source.rs | 108 --- patches/fontique/src/source_cache.rs | 254 ----- 43 files changed, 248 insertions(+), 7204 deletions(-) delete mode 100644 patches/fontique/.cargo-ok delete mode 100644 patches/fontique/.cargo_vcs_info.json delete mode 100644 patches/fontique/Cargo.lock delete mode 100644 patches/fontique/Cargo.toml delete mode 100644 patches/fontique/Cargo.toml.orig delete mode 100644 patches/fontique/LICENSE-APACHE delete mode 100644 patches/fontique/LICENSE-MIT delete mode 100644 patches/fontique/README.md delete mode 100644 patches/fontique/examples/generic_families.rs delete mode 100644 patches/fontique/src/attributes.rs delete mode 100644 patches/fontique/src/backend/android.rs delete mode 100644 patches/fontique/src/backend/coretext.rs delete mode 100644 patches/fontique/src/backend/dwrite.rs delete mode 100644 patches/fontique/src/backend/fontconfig.rs delete mode 100644 patches/fontique/src/backend/mod.rs delete mode 100644 patches/fontique/src/charmap.rs delete mode 100644 patches/fontique/src/collection/mod.rs delete mode 100644 patches/fontique/src/collection/query.rs delete mode 100644 patches/fontique/src/fallback.rs delete mode 100644 patches/fontique/src/family.rs delete mode 100644 patches/fontique/src/family_name.rs delete mode 100644 patches/fontique/src/font.rs delete mode 100644 patches/fontique/src/generic.rs delete mode 100644 patches/fontique/src/impl_fontconfig.rs delete mode 100644 patches/fontique/src/lib.rs delete mode 100644 patches/fontique/src/matching.rs delete mode 100644 patches/fontique/src/scan.rs delete mode 100644 patches/fontique/src/script.rs delete mode 100644 patches/fontique/src/source.rs delete mode 100644 patches/fontique/src/source_cache.rs diff --git a/Cargo.lock b/Cargo.lock index 6871046c..0b6755fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -147,6 +147,15 @@ dependencies = [ "equator", ] +[[package]] +name = "alloca" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7d05ea6aea7e9e64d25b9156ba2fee3fdd659e34e41063cd2fc7cd020d7f4" +dependencies = [ + "cc", +] + [[package]] name = "allocator-api2" version = "0.2.21" @@ -308,7 +317,7 @@ dependencies = [ "dioxus", "loki-render-cache", "peniko", - "read-fonts 0.37.0", + "read-fonts 0.40.2", "tokio", ] @@ -366,7 +375,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -377,9 +386,9 @@ checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +checksum = "f02882884d3e1bc524fb12c79f107f6ad0e1cfd498c536ffb494301740995dfe" [[package]] name = "arref" @@ -539,7 +548,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -574,7 +583,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -931,7 +940,7 @@ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -948,9 +957,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" [[package]] name = "calloop" @@ -986,9 +995,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.64" +version = "1.2.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad887fd958be91b5098c0248def011f4523ab786cd411be668777e55063501f" +checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" dependencies = [ "find-msvc-tools", "jobserver", @@ -1190,7 +1199,7 @@ checksum = "4f160aad86b4343e8d4e261fee9965c3005b2fd6bc117d172ab65948779e4acf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1201,7 +1210,7 @@ checksum = "42571ed01eb46d2e1adcf99c8ca576f081e46f2623d13500eba70d1d99a4c439" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1324,25 +1333,24 @@ dependencies = [ [[package]] name = "criterion" -version = "0.5.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +checksum = "950046b2aa2492f9a536f5f4f9a3de7b9e2476e575e05bd6c333371add4d98f3" dependencies = [ + "alloca", "anes", "cast", "ciborium", "clap", "criterion-plot", - "is-terminal", - "itertools 0.10.5", + "itertools 0.13.0", "num-traits", - "once_cell", "oorandom", + "page_size", "plotters", "rayon", "regex", "serde", - "serde_derive", "serde_json", "tinytemplate", "walkdir", @@ -1350,12 +1358,12 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.5.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +checksum = "d8d80a2f4f5b554395e47b5d8305bc3d27813bacb73493eb1001e8f76dae29ea" dependencies = [ "cast", - "itertools 0.10.5", + "itertools 0.13.0", ] [[package]] @@ -1426,7 +1434,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1475,7 +1483,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1488,7 +1496,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1499,7 +1507,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1510,7 +1518,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1539,7 +1547,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1560,7 +1568,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1682,7 +1690,7 @@ dependencies = [ "dioxus-rsx", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1798,7 +1806,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1905,7 +1913,7 @@ dependencies = [ "quote", "sha2", "slab", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1918,7 +1926,7 @@ dependencies = [ "proc-macro2-diagnostics", "quote", "rustversion", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1958,7 +1966,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1996,23 +2004,23 @@ dependencies = [ [[package]] name = "dirs" -version = "5.0.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] @@ -2041,7 +2049,7 @@ checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -2201,7 +2209,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -2213,7 +2221,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -2234,7 +2242,7 @@ checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -2255,7 +2263,7 @@ dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -2285,7 +2293,7 @@ checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -2483,6 +2491,15 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "font-types" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bf886368962a7d8456f136073ed33ed1b0770c690d2063731bb6a776e99f33" +dependencies = [ + "bytemuck", +] + [[package]] name = "fontconfig-parser" version = "0.5.8" @@ -2531,9 +2548,11 @@ dependencies = [ [[package]] name = "fontique" -version = "0.8.0" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "274fa4f0f0a926ae182c7c076c078cce8a38471d15e61a102a02cac984be9813" dependencies = [ - "hashbrown 0.16.1", + "hashbrown 0.17.1", "linebender_resource_handle", "memmap2", "objc2 0.6.4", @@ -2541,7 +2560,7 @@ dependencies = [ "objc2-core-text", "objc2-foundation 0.3.2", "parlance", - "read-fonts 0.37.0", + "read-fonts 0.39.2", "roxmltree 0.21.1", "smallvec", "windows 0.62.2", @@ -2567,7 +2586,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -2648,7 +2667,7 @@ checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -2767,15 +2786,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", "libc", "r-efi 6.0.0", - "wasip2", - "wasip3", ] [[package]] @@ -2926,14 +2943,13 @@ dependencies = [ [[package]] name = "harfrust" -version = "0.5.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da2e5ae821f6e96664977bf974d6d6a2d6682f9ccee23e62ec1d134246845f9" +checksum = "d12c7c642d4ce8c2e784b4751a6634bd89583912265add4a679a8882d123fbcd" dependencies = [ "bitflags 2.13.0", "bytemuck", - "core_maths", - "read-fonts 0.37.0", + "read-fonts 0.39.2", "smallvec", ] @@ -2971,15 +2987,15 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "foldhash 0.2.0", -] [[package]] name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash 0.2.0", +] [[package]] name = "heapless" @@ -3315,12 +3331,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a2c462a4d927d512f5f882a033ddd62f33a05bb9f230d98f736ac3dc85938f" -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - [[package]] name = "ident_case" version = "1.0.1" @@ -3446,7 +3456,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -3474,40 +3484,29 @@ version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" -[[package]] -name = "is-terminal" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.61.2", -] - [[package]] name = "itertools" -version = "0.10.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ "either", ] [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -3570,7 +3569,7 @@ dependencies = [ "quote", "rustc_version", "simd_cesu8", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -3598,7 +3597,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" dependencies = [ "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -3711,12 +3710,6 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c83bff1d572d6b9aeef67ddfc8448e4a3737909cb28e81f97c791b9018703e52" -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - [[package]] name = "lebe" version = "0.5.3" @@ -3814,9 +3807,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "loki-acid" @@ -3912,11 +3905,11 @@ version = "0.1.0" dependencies = [ "appthere-color", "criterion", - "fontique 0.8.0", + "fontique 0.10.0", "loki-doc-model", "loki-primitives", "loro", - "parley 0.8.0", + "parley 0.10.0", "thiserror 2.0.18", "tracing", ] @@ -3953,9 +3946,9 @@ dependencies = [ "loki-presentation-model", "loki-primitives", "loki-sheet-model", - "parley 0.8.0", + "parley 0.10.0", "quick-xml 0.36.2", - "read-fonts 0.37.0", + "read-fonts 0.40.2", "thiserror 2.0.18", "zip", ] @@ -4000,7 +3993,7 @@ dependencies = [ "blitz-shell", "dioxus", "dirs", - "fontique 0.8.0", + "fontique 0.10.0", "kurbo 0.12.0", "log", "loki-doc-model", @@ -4097,7 +4090,7 @@ dependencies = [ "blitz-shell", "dioxus", "dirs", - "fontique 0.8.0", + "fontique 0.10.0", "kurbo 0.12.0", "log", "loki-doc-model", @@ -4131,7 +4124,7 @@ dependencies = [ "blitz-shell", "dioxus", "dirs", - "fontique 0.8.0", + "fontique 0.10.0", "futures-channel", "kurbo 0.12.0", "log", @@ -4171,8 +4164,6 @@ dependencies = [ "loki-ooxml", "peniko", "pollster", - "read-fonts 0.37.0", - "skrifa 0.40.0", "thiserror 2.0.18", "vello", "wgpu", @@ -4375,7 +4366,7 @@ checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -4394,7 +4385,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f44db74bde26fdf427af23f1d146c211aed857c59e3be750cf2617f6b0b05c94" dependencies = [ "proc-macro2", - "syn 2.0.117", + "syn 2.0.118", "synstructure", ] @@ -4439,7 +4430,7 @@ dependencies = [ "manganis-core", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -4461,7 +4452,7 @@ checksum = "ac84fd3f360fcc43dc5f5d186f02a94192761a080e8bc58621ad4d12296a58cf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -4726,7 +4717,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -4799,7 +4790,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -5236,6 +5227,16 @@ dependencies = [ "ttf-parser", ] +[[package]] +name = "page_size" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "parking" version = "2.2.1" @@ -5287,27 +5288,27 @@ dependencies = [ [[package]] name = "parley" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c00ec192e1a402861526eff91a4b4690a2e5a17a4ae2deb772d72b49daf868" +checksum = "6b1cfcf399c774719fb1fa51bc6b91e86bdf003b03202a0902f1827ba6750746" dependencies = [ - "fontique 0.8.0", - "harfrust 0.5.2", - "hashbrown 0.16.1", + "fontique 0.10.0", + "harfrust 0.8.4", + "hashbrown 0.17.1", "icu_normalizer", "icu_properties", "icu_segmenter", "linebender_resource_handle", "parlance", "parley_data", - "skrifa 0.40.0", + "skrifa 0.42.1", ] [[package]] name = "parley_data" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "232313eddc02ac27f015e8f8eeb7facce8a896116df7e3eda1bfd9f600a9a39d" +checksum = "d1d3755e2cc12c0625b0cd2f2773c6a37dd11d1531940c945ade4aeb78f2b145" dependencies = [ "icu_properties", ] @@ -5379,7 +5380,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -5432,7 +5433,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -5467,7 +5468,7 @@ checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -5630,16 +5631,6 @@ dependencies = [ "yansi", ] -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn 2.0.117", -] - [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -5666,7 +5657,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "version_check", ] @@ -5686,7 +5677,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb" dependencies = [ "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -5990,15 +5981,25 @@ dependencies = [ [[package]] name = "read-fonts" -version = "0.37.0" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5" +checksum = "c4ed38b89c2c77ff968c524145ad65fb010f38af5c7a224b53b81d47ac2daa81" dependencies = [ "bytemuck", - "core_maths", "font-types 0.11.3", ] +[[package]] +name = "read-fonts" +version = "0.40.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487889119a5f19ff7c0a20637196bdc76b9f54ebec17e3588b5d75e4999f8773" +dependencies = [ + "bytemuck", + "font-types 0.12.0", + "once_cell", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -6028,13 +6029,13 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.6" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.17", "libredox", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] @@ -6213,7 +6214,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.117", + "syn 2.0.118", "walkdir", ] @@ -6458,7 +6459,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -6478,7 +6479,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -6502,7 +6503,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -6651,12 +6652,12 @@ dependencies = [ [[package]] name = "skrifa" -version = "0.40.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac" +checksum = "0c34617370ae968efb7161bb2beb517d9084659aae19e24b89e3db25b46e4564" dependencies = [ "bytemuck", - "read-fonts 0.37.0", + "read-fonts 0.39.2", ] [[package]] @@ -6682,7 +6683,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb251b407f50028476a600541542b605bb864d35d9ee1de4f6cab45d88475e6d" dependencies = [ "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -6959,7 +6960,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "synstructure", ] @@ -7086,7 +7087,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0811b01ca2c4e8718760713911feaf4675c24f94e50530a015ec646cfb622f7c" dependencies = [ - "skrifa 0.40.0", + "skrifa 0.42.1", "yazi", "zeno", ] @@ -7104,9 +7105,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.117" +version = "2.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" dependencies = [ "proc-macro2", "quote", @@ -7130,7 +7131,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -7180,7 +7181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.2", + "getrandom 0.4.3", "once_cell", "rustix 1.1.4", "windows-sys 0.61.2", @@ -7238,7 +7239,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -7249,7 +7250,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -7369,7 +7370,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "synstructure", ] @@ -7525,7 +7526,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -7959,7 +7960,7 @@ checksum = "59195a1db0e95b920366d949ba5e0d3fc0e70b67c09be15ce5abb790106b0571" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -7974,16 +7975,7 @@ version = "1.0.4+wasi-0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" dependencies = [ - "wit-bindgen 0.57.1", -] - -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen 0.51.0", + "wit-bindgen", ] [[package]] @@ -8028,7 +8020,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "wasm-bindgen-shared", ] @@ -8041,28 +8033,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder", - "wasmparser", -] - [[package]] name = "wasm-streams" version = "0.4.2" @@ -8076,18 +8046,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags 2.13.0", - "hashbrown 0.15.5", - "indexmap", - "semver", -] - [[package]] name = "wayland-backend" version = "0.3.15" @@ -8138,9 +8096,9 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.32.12" +version = "0.32.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "563a85523cade2429938e790815fd7319062103b9f4a2dc806e9b53b95982d8f" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" dependencies = [ "bitflags 2.13.0", "wayland-backend", @@ -8247,9 +8205,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f5ee44c96cf55f1b349600768e3ece3a8f26010c05265ab73f945bb1a2eb9d" +checksum = "bf85cb06032201fa7c6f829d7db5a7e5aa45bcc0655327713065f6f0576731bf" dependencies = [ "rustls-pki-types", ] @@ -8419,6 +8377,22 @@ dependencies = [ "wgpu", ] +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.11" @@ -8428,6 +8402,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "windows" version = "0.58.0" @@ -8504,7 +8484,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -8515,7 +8495,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -8526,7 +8506,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -8537,7 +8517,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -8602,15 +8582,6 @@ dependencies = [ "windows-targets 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -8662,21 +8633,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -8725,12 +8681,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -8749,12 +8699,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -8773,12 +8717,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -8809,12 +8747,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -8833,12 +8765,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -8857,12 +8783,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -8881,12 +8801,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -8969,100 +8883,12 @@ dependencies = [ "memchr", ] -[[package]] -name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - [[package]] name = "wit-bindgen" version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck 0.5.0", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck 0.5.0", - "indexmap", - "prettyplease", - "syn 2.0.117", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn 2.0.117", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags 2.13.0", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - [[package]] name = "writeable" version = "0.6.3" @@ -9206,7 +9032,7 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "synstructure", ] @@ -9301,7 +9127,7 @@ checksum = "709ab20fc57cb22af85be7b360239563209258430bccf38d8b979c5a2ae3ecce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "zbus-lockstep", "zbus_xml", "zvariant 4.2.0", @@ -9316,7 +9142,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "zvariant_utils 2.1.0", ] @@ -9329,7 +9155,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "zbus_names 4.3.2", "zvariant 5.12.0", "zvariant_utils 3.4.0", @@ -9393,7 +9219,7 @@ checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -9413,7 +9239,7 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "synstructure", ] @@ -9455,7 +9281,7 @@ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -9554,7 +9380,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "zvariant_utils 2.1.0", ] @@ -9567,7 +9393,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "zvariant_utils 3.4.0", ] @@ -9579,7 +9405,7 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -9591,6 +9417,6 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.117", + "syn 2.0.118", "winnow 1.0.3", ] diff --git a/Cargo.toml b/Cargo.toml index 355c3024..e247eef7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,11 +21,6 @@ loki-fonts = { path = "loki-fonts" } android-activity = "0.6" [patch.crates-io] -# PATCH: fixes missing fontconfig_sys alias and dlopen/static feature-unification -# conflict with blitz-dom's fontique 0.6 — remove when fontique >0.8.0 on -# crates.io restores the alias and resolves the linkage conflict. See docs/patches.md. -fontique = { path = "patches/fontique" } - # PATCH: vendors dioxus-native-dom to avoid runtime unimplemented!() panics in # HtmlEventConverter (composition, touch, scroll, etc.) — remove when upstream # implements the converters Loki requires. See docs/patches.md. diff --git a/README.md b/README.md index 4df6d46b..e260feda 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,6 @@ and the **Upgrading Dioxus** procedure (the dioxus patches are version-pinned). | `patches/dioxus-native` | Calls `request_redraw()` after CSS head-element insertion (Android blank screen fix) | | `patches/blitz-net` | Switches reqwest from native-tls to rustls (Android has no `libssl.so`) | | `patches/blitz-dom` | Fixes tabindex focus-on-click for non-input elements | -| `patches/fontique` | Fixes missing `fontconfig_sys` alias in the crates.io 0.8.0 publish | ## AI Coding Assistants diff --git a/appthere-canvas/Cargo.toml b/appthere-canvas/Cargo.toml index 921802a8..3c4f6535 100644 --- a/appthere-canvas/Cargo.toml +++ b/appthere-canvas/Cargo.toml @@ -19,4 +19,4 @@ loki-render-cache = { path = "../loki-render-cache", default-features = false } dioxus = { version = "=0.7.9", features = ["native"], optional = true } tokio = { version = "1", features = ["time", "sync"], optional = true } peniko = { version = "0.5", optional = true } -read-fonts = "0.37" +read-fonts = "0.40" diff --git a/docs/fidelity-status.md b/docs/fidelity-status.md index 0839033f..f773367b 100644 --- a/docs/fidelity-status.md +++ b/docs/fidelity-status.md @@ -54,7 +54,7 @@ This is the living source of truth documenting which document features, characte | **Tab Stops** | Yes | Yes | Yes | Position-sorted tab stops supported. | | **Background Color** | Yes | Yes | Yes | Paragraph background shading supported. | | **border_between** | Yes | No | No | Rules between adjacent same-styled paragraphs ignored. | -| **bidi / RTL** | Yes | No | No | RTL paragraphs ignored due to Parley 0.6 API limitations. | +| **bidi / RTL** | Yes | No | No | RTL paragraphs ignored due to Parley API limitations. | --- diff --git a/docs/patches.md b/docs/patches.md index 8dde831b..c54c397f 100644 --- a/docs/patches.md +++ b/docs/patches.md @@ -14,45 +14,6 @@ temporary and has a documented removal condition. ## Active patches -### fontique — 0.8.0 - -**Source:** `patches/fontique/` (local), vendored from upstream commit -`8dbecc0545a0c97eb605937b928bc186d2d1295c` in -[linebender/parley](https://github.com/linebender/parley) (`fontique/` path -in that monorepo). - -**Fixes:** Two related issues with the crates.io publication of fontique 0.8.0: - -1. **Missing package alias.** The crates.io publication lost the - `fontconfig_sys = { package = "yeslogic-fontconfig-sys", ... }` alias - during Cargo normalization. The source in - `src/backend/fontconfig.rs` uses `use fontconfig_sys::…` and requires - this alias to compile. - -2. **Workspace feature-unification conflict.** `blitz-dom` depends on - fontique 0.6.0 and activates `yeslogic-fontconfig-sys/dlopen` for the - entire build graph. Without the patch, fontique 0.8.0 is built without - dlopen and fails on static-C imports because the two versions of the - yeslogic-fontconfig-sys feature cannot agree. The patch enables - `fontconfig-dlopen` on 0.8.0 so both versions use the same linkage mode. - -**Root cause:** Bug in the fontique 0.8.0 crates.io publish pipeline (package -alias dropped during Cargo manifest normalisation). Compounded by Cargo -feature-unification behaviour when two semver-incompatible versions of -fontique coexist in the dependency graph. - -**Upstream status:** No upstream issue filed as of 2026-05-03. Upstream -repository is [linebender/parley](https://github.com/linebender/parley). - -**Removal condition:** Remove when a post-0.8.0 fontique release on crates.io -restores the `fontconfig_sys` package alias and the dlopen/static linkage -conflict is resolved (either fontique 0.8 is no longer paired with blitz-dom's -fontique 0.6, or upstream aligns feature flags). - -**Added:** 2026-04-13 (introduced in the loki-text scaffold commit). - ---- - ### dioxus-native-dom — 0.7.9 **Version pin:** the whole dioxus family is pinned to `=0.7.9` in the root @@ -604,3 +565,23 @@ Before removing a patch: 3. Run `cargo check --workspace` and `cargo test --workspace`. 4. Remove the patch source directory (`patches//`). 5. Update or remove the corresponding entry in this file. + +## Removed patches + +### fontique — removed 2026-06-21 (was 0.8.0) + +The `patches/fontique` patch (added 2026-04-13) worked around two issues with +the crates.io publication of **fontique 0.8.0**: (1) a missing +`fontconfig_sys = { package = "yeslogic-fontconfig-sys", … }` alias dropped +during the publish pipeline, and (2) a dlopen/static feature-unification +conflict with blitz-dom's fontique 0.6. + +Removed when Loki's own crates moved from fontique 0.8 to **fontique 0.10** +(alongside the parley 0.8 → 0.10 upgrade). fontique 0.10 restores the +`fontconfig_sys` alias, so issue (1) no longer applies. Issue (2) is now +handled without a patch by enabling the `fontconfig-dlopen` feature directly on +`loki-layout`'s fontique dependency (fontique is re-exported through parley, so +this turns dlopen on wherever fontique appears — including crates such as +`loki-vello` whose graph does not contain blitz-dom). blitz-dom's own fontique +0.6 continues to enable `yeslogic-fontconfig-sys/dlopen`, so both fontique +generations agree on linkage mode. diff --git a/loki-layout/Cargo.toml b/loki-layout/Cargo.toml index 68176ea2..acc0e74c 100644 --- a/loki-layout/Cargo.toml +++ b/loki-layout/Cargo.toml @@ -12,14 +12,19 @@ categories = ["graphics", "text-processing"] loki-doc-model = { path = "../loki-doc-model" } loki-primitives = { path = "../loki-primitives" } appthere-color = "0.1.1" -parley = "0.8" -fontique = "0.8" +parley = "0.10" +# Force fontconfig-dlopen so fontique loads libfontconfig at runtime instead of +# requiring static C symbols at link time. This must be enabled wherever fontique +# is pulled (parley re-exports it) so crates that build without the blitz stack in +# their graph (e.g. loki-vello) still link — blitz-dom otherwise enables +# yeslogic-fontconfig-sys/dlopen globally, but it is not always present. +fontique = { version = "0.10", features = ["fontconfig-dlopen"] } thiserror = "2" tracing = "0.1" [dev-dependencies] # Statistical benchmark harness (layout + edit-path scaling). -criterion = "0.5" +criterion = "0.8" # Drives real CRDT mutations through the edit-path benchmark / report. loro = "1.11.1" diff --git a/loki-layout/src/para.rs b/loki-layout/src/para.rs index 48a96722..a1822895 100644 --- a/loki-layout/src/para.rs +++ b/loki-layout/src/para.rs @@ -16,8 +16,8 @@ use loki_doc_model::style::list_style::{ BulletChar, ListId, ListLevel, ListLevelKind, NumberingScheme, }; use parley::{ - Alignment, AlignmentOptions, Cursor, FontFamily, FontStyle, FontWeight, InlineBox, LineHeight, - PositionedLayoutItem, RangedBuilder, Selection, StyleProperty, + Alignment, AlignmentOptions, Cursor, FontFamily, FontStyle, FontWeight, InlineBox, + InlineBoxKind, LineHeight, PositionedLayoutItem, RangedBuilder, Selection, StyleProperty, }; use crate::color::LayoutColor; @@ -821,6 +821,7 @@ fn layout_paragraph_uncached( for (idx, &pos) in tab_char_positions.iter().enumerate() { probe.push_inline_box(InlineBox { id: idx as u64, + kind: InlineBoxKind::InFlow, index: pos, width: 0.0, height: 0.0, @@ -862,6 +863,7 @@ fn layout_paragraph_uncached( let width = tab_inline_widths.get(idx).copied().unwrap_or(0.0); builder.push_inline_box(InlineBox { id: idx as u64, + kind: InlineBoxKind::InFlow, index: pos, width, height: 0.0, @@ -870,11 +872,7 @@ fn layout_paragraph_uncached( let mut layout = builder.build(&clean_text); layout.break_all_lines(Some(line_w)); - layout.align( - Some(line_w), - para_props.alignment, - AlignmentOptions::default(), - ); + layout.align(para_props.alignment, AlignmentOptions::default()); let total_height = layout.height(); let total_width = layout.width(); @@ -890,7 +888,7 @@ fn layout_paragraph_uncached( .unwrap_or(0.0); let line_boundaries: Vec<(f32, f32)> = layout .lines() - .map(|l| (l.metrics().min_coord, l.metrics().max_coord)) + .map(|l| (l.metrics().block_min_coord, l.metrics().block_max_coord)) .collect(); let mut items: Vec = Vec::new(); diff --git a/loki-ooxml/Cargo.toml b/loki-ooxml/Cargo.toml index 20b1e93a..97effb51 100644 --- a/loki-ooxml/Cargo.toml +++ b/loki-ooxml/Cargo.toml @@ -38,8 +38,8 @@ features = ["std"] loki-opc = { path = "../loki-opc" } loki-layout = { path = "../loki-layout" } zip = { version = "2", default-features = false, features = ["deflate"] } -parley = "0.8" -read-fonts = "0.37.0" +parley = "0.10" +read-fonts = "0.40" quick-xml = { version = "0.36" } [package.metadata.docs.rs] diff --git a/loki-presentation/Cargo.toml b/loki-presentation/Cargo.toml index 07cd787d..cde2be89 100644 --- a/loki-presentation/Cargo.toml +++ b/loki-presentation/Cargo.toml @@ -50,12 +50,12 @@ peniko = "0.5" # Kurbo geometry primitives. kurbo = "0.12" # Font config. -fontique = { version = "0.8", features = ["fontconfig-dlopen"] } +fontique = { version = "0.10", features = ["fontconfig-dlopen"] } loro = "1.11.1" # Unicode segmentation. unicode-segmentation = "1" # Platform-specific paths. -dirs = "5" +dirs = "6" # Serialisation. serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/loki-spreadsheet/Cargo.toml b/loki-spreadsheet/Cargo.toml index 1d55419a..e636134a 100644 --- a/loki-spreadsheet/Cargo.toml +++ b/loki-spreadsheet/Cargo.toml @@ -49,12 +49,12 @@ peniko = "0.5" # Kurbo geometry primitives. kurbo = "0.12" # Font config. -fontique = { version = "0.8", features = ["fontconfig-dlopen"] } +fontique = { version = "0.10", features = ["fontconfig-dlopen"] } loro = "1.11.1" # Unicode segmentation. unicode-segmentation = "1" # Platform-specific paths. -dirs = "5" +dirs = "6" # Serialisation. serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/loki-text/Cargo.toml b/loki-text/Cargo.toml index ba13fa80..3fb3a530 100644 --- a/loki-text/Cargo.toml +++ b/loki-text/Cargo.toml @@ -50,19 +50,19 @@ vello = "0.6" peniko = "0.5" # Kurbo geometry primitives (Rect, Stroke, Affine) for scene construction. kurbo = "0.12" -# Force fontconfig-dlopen on fontique v0.8 so it uses the same dlopen path as +# Force fontconfig-dlopen on fontique so it uses the same dlopen path as # fontique v0.6 (pulled in by blitz-dom), which activates # yeslogic-fontconfig-sys/dlopen for the whole workspace. Without this, -# fontique v0.8 would try to use static C function symbols that are absent when +# fontique would try to use static C function symbols that are absent when # dlopen mode is in effect. -fontique = { version = "0.8", features = ["fontconfig-dlopen"] } +fontique = { version = "0.10", features = ["fontconfig-dlopen"] } loro = "1.11.1" # oneshot channel used to await the off-main-thread document-open layout. futures-channel = "0.3" # Unicode grapheme cluster segmentation for correct backspace/delete behaviour. unicode-segmentation = "1" # Platform-specific data/config directory paths for recent-documents persistence. -dirs = "5" +dirs = "6" # JSON serialisation for recent-documents file. serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/loki-vello/Cargo.toml b/loki-vello/Cargo.toml index d0785cba..2abf37ad 100644 --- a/loki-vello/Cargo.toml +++ b/loki-vello/Cargo.toml @@ -17,8 +17,6 @@ kurbo = "0.12" thiserror = "2" image = "0.25" base64 = "0.22" -read-fonts = "0.37" -skrifa = "0.40" [dev-dependencies] wgpu = "26" diff --git a/patches/fontique/.cargo-ok b/patches/fontique/.cargo-ok deleted file mode 100644 index 5f8b7958..00000000 --- a/patches/fontique/.cargo-ok +++ /dev/null @@ -1 +0,0 @@ -{"v":1} \ No newline at end of file diff --git a/patches/fontique/.cargo_vcs_info.json b/patches/fontique/.cargo_vcs_info.json deleted file mode 100644 index 32cc84ab..00000000 --- a/patches/fontique/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "8dbecc0545a0c97eb605937b928bc186d2d1295c" - }, - "path_in_vcs": "fontique" -} \ No newline at end of file diff --git a/patches/fontique/Cargo.lock b/patches/fontique/Cargo.lock deleted file mode 100644 index b5110b43..00000000 --- a/patches/fontique/Cargo.lock +++ /dev/null @@ -1,387 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "bitflags" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" - -[[package]] -name = "bytemuck" -version = "1.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "core_maths" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" -dependencies = [ - "libm", -] - -[[package]] -name = "dlib" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" -dependencies = [ - "libloading", -] - -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - -[[package]] -name = "font-types" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73829a7b5c91198af28a99159b7ae4afbb252fb906159ff7f189f3a2ceaa3df2" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "fontique" -version = "0.8.0" -dependencies = [ - "hashbrown", - "linebender_resource_handle", - "memmap2", - "objc2", - "objc2-core-foundation", - "objc2-core-text", - "objc2-foundation", - "parlance", - "read-fonts", - "roxmltree", - "smallvec", - "windows", - "windows-core", - "yeslogic-fontconfig-sys", -] - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "foldhash", -] - -[[package]] -name = "libc" -version = "0.2.183" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" - -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] - -[[package]] -name = "libm" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" - -[[package]] -name = "linebender_resource_handle" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" - -[[package]] -name = "memchr" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" - -[[package]] -name = "memmap2" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" -dependencies = [ - "libc", -] - -[[package]] -name = "objc2" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" -dependencies = [ - "objc2-encode", -] - -[[package]] -name = "objc2-core-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" -dependencies = [ - "bitflags", -] - -[[package]] -name = "objc2-core-text" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" -dependencies = [ - "bitflags", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-encode" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" - -[[package]] -name = "objc2-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" -dependencies = [ - "bitflags", - "objc2", -] - -[[package]] -name = "once_cell" -version = "1.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" - -[[package]] -name = "parlance" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6937eda350acc1a5d05872c3cbf99fe78619c269096e2be3d4a350058639d5" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "proc-macro2" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "read-fonts" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5" -dependencies = [ - "bytemuck", - "core_maths", - "font-types", -] - -[[package]] -name = "roxmltree" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1964b10c76125c36f8afe190065a4bf9a87bf324842c05701330bba9f1cacbb" -dependencies = [ - "memchr", -] - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "syn" -version = "2.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "unicode-ident" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" - -[[package]] -name = "windows" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" -dependencies = [ - "windows-collections", - "windows-core", - "windows-future", - "windows-numerics", -] - -[[package]] -name = "windows-collections" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" -dependencies = [ - "windows-core", -] - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-future" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" -dependencies = [ - "windows-core", - "windows-link", - "windows-threading", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-numerics" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" -dependencies = [ - "windows-core", - "windows-link", -] - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-threading" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" -dependencies = [ - "windows-link", -] - -[[package]] -name = "yeslogic-fontconfig-sys" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503a066b4c037c440169d995b869046827dbc71263f6e8f3be6d77d4f3229dbd" -dependencies = [ - "dlib", - "once_cell", - "pkg-config", -] diff --git a/patches/fontique/Cargo.toml b/patches/fontique/Cargo.toml deleted file mode 100644 index 3c2355ea..00000000 --- a/patches/fontique/Cargo.toml +++ /dev/null @@ -1,195 +0,0 @@ -# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -# -# When uploading crates to the registry Cargo will automatically -# "normalize" Cargo.toml files for maximal compatibility -# with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies. -# -# If you are reading this file be aware that the original Cargo.toml -# will likely look very different (and much more reasonable). -# See Cargo.toml.orig for the original contents. - -[package] -edition = "2021" -rust-version = "1.88" -name = "fontique" -version = "0.8.0" -build = false -autolib = false -autobins = false -autoexamples = false -autotests = false -autobenches = false -description = "Font enumeration and fallback." -readme = "README.md" -keywords = [ - "font", - "text", -] -categories = [ - "gui", - "os", -] -license = "Apache-2.0 OR MIT" -repository = "https://github.com/linebender/parley" - -[package.metadata.docs.rs] -all-features = true - -[features] -bytemuck = ["parlance/bytemuck"] -default = ["system"] -fontconfig-dlopen = ["yeslogic-fontconfig-sys?/dlopen"] -libm = ["read-fonts/libm"] -std = [ - "read-fonts/std", - "dep:memmap2", - "parlance/std", -] -system = [ - "std", - "dep:windows", - "dep:windows-core", - "dep:objc2", - "dep:objc2-core-foundation", - "dep:objc2-core-text", - "dep:objc2-foundation", - "dep:yeslogic-fontconfig-sys", - "dep:roxmltree", - "fontconfig-dlopen", -] - -[lib] -name = "fontique" -path = "src/lib.rs" - -[[example]] -name = "generic_families" -path = "examples/generic_families.rs" - -[dependencies.hashbrown] -version = "0.16.1" -features = [ - "default-hasher", - "raw-entry", -] -default-features = false - -[dependencies.linebender_resource_handle] -version = "0.1.1" -default-features = false - -[dependencies.memmap2] -version = "0.9.10" -optional = true - -[dependencies.parlance] -version = "0.1.0" -default-features = false - -[dependencies.read-fonts] -version = "0.37.0" -default-features = false - -[dependencies.smallvec] -version = "1.15.1" - - -[target.'cfg(target_os = "android")'.dependencies.roxmltree] -version = "0.21.1" -optional = true - -[target.'cfg(target_os = "linux")'.dependencies.yeslogic-fontconfig-sys] -version = "6.0.0" -optional = true - -[target.'cfg(target_os = "windows")'.dependencies.windows] -version = "0.62.2" -features = ["Win32_Graphics_DirectWrite"] -optional = true - -[target.'cfg(target_os = "windows")'.dependencies.windows-core] -version = "0.62.2" -optional = true - -[target.'cfg(target_vendor = "apple")'.dependencies.objc2] -version = "0.6.4" -features = [ - "std", - "relax-sign-encoding", -] -optional = true - -[target.'cfg(target_vendor = "apple")'.dependencies.objc2-core-foundation] -version = "0.3.2" -features = [ - "CFBase", - "CFURL", -] -optional = true -default-features = false - -[target.'cfg(target_vendor = "apple")'.dependencies.objc2-core-text] -version = "0.3.2" -features = [ - "CTFont", - "CTFontDescriptor", - "CTFontCollection", -] -optional = true -default-features = false - -[target.'cfg(target_vendor = "apple")'.dependencies.objc2-foundation] -version = "0.3.2" -features = [ - "alloc", - "NSArray", - "NSEnumerator", - "NSPathUtilities", - "NSString", -] -optional = true -default-features = false - -[lints.clippy] -allow_attributes_without_reason = "warn" -cargo_common_metadata = "warn" -cast_possible_truncation = "warn" -collection_is_never_read = "warn" -dbg_macro = "warn" -debug_assert_with_mut_call = "warn" -default_trait_access = "warn" -doc_markdown = "warn" -fn_to_numeric_cast_any = "warn" -infinite_loop = "warn" -large_stack_arrays = "warn" -mismatching_type_param_order = "warn" -missing_assert_message = "warn" -missing_fields_in_debug = "warn" -negative_feature_names = "warn" -redundant_feature_names = "warn" -same_functions_in_if_condition = "warn" -semicolon_if_nothing_returned = "warn" -should_panic_without_expect = "warn" -todo = "warn" -too_many_arguments = "allow" -unseparated_literal_suffix = "warn" -use_self = "warn" -wildcard_dependencies = "warn" - -[lints.rust] -elided_lifetimes_in_paths = "warn" -keyword_idents_2024 = "forbid" -missing_debug_implementations = "warn" -missing_docs = "warn" -non_ascii_idents = "forbid" -non_local_definitions = "forbid" -trivial_numeric_casts = "warn" -unnameable_types = "warn" -unreachable_pub = "warn" -unsafe_code = "deny" -unsafe_op_in_unsafe_fn = "forbid" -unused_import_braces = "warn" -unused_lifetimes = "warn" -unused_macro_rules = "warn" -unused_qualifications = "warn" diff --git a/patches/fontique/Cargo.toml.orig b/patches/fontique/Cargo.toml.orig deleted file mode 100644 index 1367bb96..00000000 --- a/patches/fontique/Cargo.toml.orig +++ /dev/null @@ -1,80 +0,0 @@ -[package] -name = "fontique" -version.workspace = true -description = "Font enumeration and fallback." -keywords = ["font", "text"] -categories = ["gui", "os"] -edition.workspace = true -rust-version.workspace = true -license.workspace = true -repository.workspace = true - -[package.metadata.docs.rs] -all-features = true - -[lints] -workspace = true - -[features] -default = ["system"] -std = ["read-fonts/std", "dep:memmap2", "parlance/std"] -libm = ["read-fonts/libm"] -bytemuck = ["parlance/bytemuck"] -# Enables support for system font backends -system = [ - "std", - "dep:windows", - "dep:windows-core", - "dep:objc2", - "dep:objc2-core-foundation", - "dep:objc2-core-text", - "dep:objc2-foundation", - "dep:yeslogic-fontconfig-sys", - "dep:roxmltree", - "fontconfig-dlopen", -] - -# Use dlopen to load the fontconfig library. This allows Fontique to compile even if the -# system does not have fontconfig installed, although the font fallback to system fonts -# will not work properly in this case (no such fallback will occur) -fontconfig-dlopen = ["yeslogic-fontconfig-sys?/dlopen"] - -[dependencies] -read-fonts = { workspace = true } -linebender_resource_handle = { workspace = true } -smallvec = "1.15.1" -memmap2 = { version = "0.9.10", optional = true } -hashbrown = { workspace = true } -parlance = { workspace = true } - -[target.'cfg(target_os = "windows")'.dependencies] -windows = { version = "0.62.2", features = ["Win32_Graphics_DirectWrite"], optional = true } -windows-core = { version = "0.62.2", optional = true } - -[target.'cfg(target_vendor = "apple")'.dependencies] -# FIX: Enable relax-sign-encoding to prevent the bug described in this issue: https://github.com/madsmtm/objc2/issues/566 -objc2 = { version = "0.6.4", optional = true, features = ["std", "relax-sign-encoding"] } -# NOTE: When updating objc2-foundation, objc2-core-foundation, or objc2-core-text make sure to use the version of objc2 -# that they reference to prevent crate duplication. -objc2-foundation = { version = "0.3.2", optional = true, default-features = false, features = [ - "alloc", - "NSArray", - "NSEnumerator", - "NSPathUtilities", - "NSString", -] } -objc2-core-foundation = { version = "0.3.2", optional = true, default-features = false, features = [ - "CFBase", - "CFURL", -] } -objc2-core-text = { version = "0.3.2", optional = true, default-features = false, features = [ - "CTFont", - "CTFontDescriptor", - "CTFontCollection", -] } - -[target.'cfg(target_os = "linux")'.dependencies] -yeslogic-fontconfig-sys = { version = "6.0.0", optional = true } - -[target.'cfg(target_os = "android")'.dependencies] -roxmltree = { version = "0.21.1", optional = true } diff --git a/patches/fontique/LICENSE-APACHE b/patches/fontique/LICENSE-APACHE deleted file mode 100644 index 16fe87b0..00000000 --- a/patches/fontique/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/patches/fontique/LICENSE-MIT b/patches/fontique/LICENSE-MIT deleted file mode 100644 index 6601faa0..00000000 --- a/patches/fontique/LICENSE-MIT +++ /dev/null @@ -1,25 +0,0 @@ -Copyright 2024 the Parley Authors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/patches/fontique/README.md b/patches/fontique/README.md deleted file mode 100644 index 6c66e142..00000000 --- a/patches/fontique/README.md +++ /dev/null @@ -1,54 +0,0 @@ -
- -# Fontique - -**Font enumeration and fallback** - -[![Latest published fontique version.](https://img.shields.io/crates/v/fontique.svg)](https://crates.io/crates/fontique) -[![Documentation build status.](https://img.shields.io/docsrs/fontique.svg)](https://docs.rs/fontique) -[![Dependency staleness status.](https://deps.rs/crate/fontique/latest/status.svg)](https://deps.rs/crate/fontique) -[![Linebender Zulip chat.](https://img.shields.io/badge/Linebender-%23parley-blue?logo=Zulip)](https://xi.zulipchat.com/#narrow/channel/205635-parley) -[![Apache 2.0 or MIT license.](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue.svg)](#license) - -
- -Fontique provides font enumeration and fallback. - -## Minimum supported Rust Version (MSRV) - -This version of Fontique has been verified to compile with **Rust 1.88** and later. - -Future versions of Fontique might increase the Rust version requirement. -It will not be treated as a breaking change and as such can even happen with small patch releases. - -
-Click here if compiling fails. - -As time has passed, some of Fontique's dependencies could have released versions with a higher Rust requirement. -If you encounter a compilation issue due to a dependency and don't want to upgrade your Rust toolchain, then you could downgrade the dependency. - -```sh -# Use the problematic dependency's name and version -cargo update -p package_name --precise 0.1.1 -``` -
- -## Community - -Discussion of Fontique development happens in the [Linebender Zulip](https://xi.zulipchat.com/), specifically the [#parley channel](https://xi.zulipchat.com/#narrow/channel/205635-parley). -All public content can be read without logging in. - -Contributions are welcome by pull request. The [Rust code of conduct] applies. - -Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache 2.0 license, shall be licensed as noted in the [License](#license) section, without any additional terms or conditions. - -## License - -Licensed under either of - -- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or ) -- MIT license ([LICENSE-MIT](LICENSE-MIT) or ) - -at your option. - -[Rust code of conduct]: https://www.rust-lang.org/policies/code-of-conduct diff --git a/patches/fontique/examples/generic_families.rs b/patches/fontique/examples/generic_families.rs deleted file mode 100644 index 7d47a37c..00000000 --- a/patches/fontique/examples/generic_families.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2024 the Parley Authors -// SPDX-License-Identifier: Apache-2.0 OR MIT - -//! Print an enumeration of discovered fonts for each `GenericFamily`. - -use fontique::{Collection, CollectionOptions, GenericFamily::*}; - -fn main() { - let mut collection = Collection::new(CollectionOptions::default()); - - for gf in [ - Serif, - SansSerif, - Monospace, - Cursive, - Fantasy, - SystemUi, - UiSerif, - UiSansSerif, - UiMonospace, - UiRounded, - Emoji, - Math, - FangSong, - ] { - println!("GenericFamily::{gf:?}:"); - - let ids = collection.generic_families(gf).collect::>(); - for id in ids { - if let Some(name) = collection.family_name(id) { - println!("{name}"); - } - } - - println!(); - } -} diff --git a/patches/fontique/src/attributes.rs b/patches/fontique/src/attributes.rs deleted file mode 100644 index 5cbc699d..00000000 --- a/patches/fontique/src/attributes.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2024 the Parley Authors -// SPDX-License-Identifier: Apache-2.0 OR MIT - -//! Properties for specifying font matching attributes. - -use core::fmt; - -use parlance::{FontStyle, FontWeight, FontWidth}; - -/// Primary attributes for font matching: [`FontWidth`], [`FontStyle`] and [`FontWeight`]. -/// -/// These are used to [configure] a [`Query`]. -/// -/// [configure]: crate::Query::set_attributes -/// [`Query`]: crate::Query -#[derive(Copy, Clone, PartialEq, Default, Debug)] -pub struct Attributes { - pub width: FontWidth, - pub style: FontStyle, - pub weight: FontWeight, -} - -impl Attributes { - /// Creates new attributes from the given width, style and weight. - pub fn new(width: FontWidth, style: FontStyle, weight: FontWeight) -> Self { - Self { - width, - style, - weight, - } - } -} - -impl fmt::Display for Attributes { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!( - f, - "width: {}, style: {}, weight: {}", - self.width, self.style, self.weight - ) - } -} diff --git a/patches/fontique/src/backend/android.rs b/patches/fontique/src/backend/android.rs deleted file mode 100644 index a9bf78d0..00000000 --- a/patches/fontique/src/backend/android.rs +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2024 the Parley Authors -// SPDX-License-Identifier: Apache-2.0 OR MIT - -use alloc::{ - boxed::Box, - str::FromStr, - string::{String, ToString}, - sync::Arc, - vec, - vec::Vec, -}; -use std::path::Path; - -use hashbrown::HashMap; -use roxmltree::{Document, Node}; - -use super::{ - FallbackKey, FamilyId, FamilyInfo, FamilyNameMap, GenericFamily, GenericFamilyMap, Language, - Script, scan, -}; - -// TODO: Use actual generic families here, where available, when fonts.xml is properly parsed. -// system-ui should map to `variant="compact"` in some scripts during fallback resolution. -const DEFAULT_GENERIC_FAMILIES: &[(GenericFamily, &[&str])] = &[ - ( - GenericFamily::SansSerif, - &["Roboto Flex", "Roboto", "Noto Sans"], - ), - (GenericFamily::Serif, &["Noto Serif"]), - (GenericFamily::Monospace, &["monospace"]), - (GenericFamily::Cursive, &["Dancing Script"]), - (GenericFamily::Fantasy, &["Noto Serif"]), - ( - GenericFamily::SystemUi, - &["Roboto Flex", "Roboto", "Noto Sans"], - ), - (GenericFamily::Emoji, &["Noto Color Emoji"]), - (GenericFamily::Math, &["Noto Sans Math", "Noto Sans"]), -]; - -pub(crate) struct SystemFonts { - pub(crate) name_map: Arc, - pub(crate) generic_families: Arc, - family_map: HashMap, - locale_fallback: Box<[(Language, FamilyId)]>, - script_fallback: Box<[(Script, FamilyId)]>, -} - -impl SystemFonts { - pub(crate) fn new() -> Self { - let android_root: String = std::env::var("ANDROID_ROOT").unwrap_or("/system".to_string()); - - let scan::ScannedCollection { - family_names: mut name_map, - families: family_map, - postscript_names, - .. - } = scan::ScannedCollection::from_paths(Path::new(&android_root).join("fonts").to_str(), 8); - let mut generic_families = GenericFamilyMap::default(); - for (family, names) in DEFAULT_GENERIC_FAMILIES { - generic_families.set( - *family, - names - .iter() - .filter_map(|name| name_map.get(name)) - .map(|name| name.id()), - ); - } - - let mut locale_fallback = vec![]; - let mut script_fallback = vec![]; - - // Try to get generic info from fonts.xml - if let Ok(s) = std::fs::read_to_string(Path::new(&android_root).join("etc/fonts.xml")) { - if let Ok(doc) = Document::parse(s.clone().as_str()) { - let root = doc.root_element(); - if root.tag_name().name() == "familyset" - || root - .attribute("version") - .is_some_and(|v| usize::from_str(v).is_ok_and(|x| x >= 21)) - { - for child in root.children() { - match child.tag_name().name() { - "alias" => { - if let Some((name, to)) = - child.attribute("name").zip(child.attribute("to")) - { - if child.attribute("weight").is_some() { - // weight aliases are an Android quirk and are not in­ - // teresting for use cases other than Android legacy. - continue; - } - let to_n = name_map.get_or_insert(to); - name_map.add_alias(to_n.id(), name); - } - } - "family" => { - if let Some(name) = child.attribute("name") { - let f = name_map.get_or_insert(name); - let _id = f.id(); - for _child in child.children() { - // TODO: map using postScriptName when available other­ - // wise use the file name, and perhaps if necess­ - // ary (e.g. if it's a collection), do something - // smarter, or something dumb that meets expecta­ - // tions on Android. - } - } else if let Some(langs) = child - .attribute("lang") - .map(|s| s.split(',').collect::>()) - { - let (_has_for, hasnt_for): ( - Vec>, - Vec>, - ) = child - .children() - .partition(|c| c.attribute("fallbackFor").is_some()); - { - // general fallback families - let (ps_named, _ps_unnamed): ( - Vec>, - Vec>, - ) = hasnt_for - .iter() - .partition(|c| c.attribute("postScriptName").is_some()); - - if let Some(family) = ps_named.iter().find_map(|x| { - postscript_names - .get(x.attribute("postScriptName").unwrap()) - }) { - for lang in langs { - if let Some(scr) = lang.strip_prefix("und-") { - // Undefined lang for script-only fallbacks - script_fallback.push(( - scr.parse().unwrap_or(Script::UNKNOWN), - *family, - )); - } else if let Ok(locale) = Language::parse(lang) { - if let Some(scr) = locale - .script() - .and_then(|s| s.parse::