From 6cca05f2f5831d29eb5f28f15d3654045c921926 Mon Sep 17 00:00:00 2001 From: meehl <12648828+meehl@users.noreply.github.com> Date: Wed, 21 Oct 2026 11:11:02 +0200 Subject: [PATCH] Upgrade parley to v0.12 --- Cargo.lock | 49 ++++++++++++++++++++++++++++++----------- Cargo.toml | 2 +- src/fonts/rasterizer.rs | 3 ++- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3cea157..5e04f95 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1090,9 +1090,9 @@ dependencies = [ [[package]] name = "fontique" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6688bc1294fe7117d788937b6c53480169b29c566954af490830d4c09da9516a" +checksum = "bbf1df16263783918b7da396077521f92b729ef7c429444dfcf03581f1448b77" dependencies = [ "hashbrown 0.17.1", "linebender_resource_handle", @@ -2673,31 +2673,54 @@ checksum = "73072a9470554c8e794778acece2312661218aaabb635600957d952cf01c716e" [[package]] name = "parley" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22d2ff88bd3f7d68d1d9b09c7e6209f9a8e8c05088295140a2bcf2e9b17038c5" +checksum = "61bd0c0c1737f0b3d3726dc06b225083af213b61913e4fbae1670613a106c6ce" +dependencies = [ + "fontique", + "hashbrown 0.17.1", + "linebender_resource_handle", + "parlance", + "parley_engine", + "smallvec", +] + +[[package]] +name = "parley_data" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43b63f808f6cc8f4a3b07de0d62a977bddd2e0bb5c232bd9e93ba8ef92e5e4b" +dependencies = [ + "icu_collections", + "icu_properties", +] + +[[package]] +name = "parley_emoji" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c4482d912d7671a7cd2089794f90ef3bb5f5f8c738230fb0fcd50fa020f0ed3" + +[[package]] +name = "parley_engine" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b74c0d373e462e504ad4436710a39f099e18e848e1ee711f70cd2dcd5a69b290" dependencies = [ "fontique", "harfrust", "hashbrown 0.17.1", + "icu_locale_core", "icu_normalizer", "icu_properties", "icu_segmenter", "linebender_resource_handle", "parlance", "parley_data", + "parley_emoji", "skrifa", ] -[[package]] -name = "parley_data" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1567535334d6ba2d3cde19221ba9a7bd0fabb3cbd99046ddfb10ae061cfcc889" -dependencies = [ - "icu_properties", -] - [[package]] name = "paste" version = "1.0.15" diff --git a/Cargo.toml b/Cargo.toml index 6c8a0e7..0d945be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ nohash-hasher = "0.2.0" num-traits = "0.2.19" open = "5.3.2" ordered-float = "5.0.0" -parley = { version = "0.11.0", default-features = false, features = ["std"] } +parley = { version = "0.12.0", default-features = false, features = ["std"] } pollster = "1.0" profiling = "1.0" puffin_http = { version = "0.17", optional = true } diff --git a/src/fonts/rasterizer.rs b/src/fonts/rasterizer.rs index 21c3fb0..ad6da44 100644 --- a/src/fonts/rasterizer.rs +++ b/src/fonts/rasterizer.rs @@ -83,7 +83,8 @@ impl GlyphRasterizer { let run = glyph_run.run(); let color = glyph_run.style().brush; let font_size = run.font_size(); - let normalized_coords = run.normalized_coords(); + let normalized_coords = + &Vec::from_iter(run.normalized_coords().iter().map(|c| c.to_bits())); let skew = run.synthesis().skew(); // skew angle for faux italic let font_ref = self.get_font_ref(run.font());