From 016b4c31d1eb10251c1910c5a3dbc06b313c9d71 Mon Sep 17 00:00:00 2001 From: Fred Clausen <43556888+fredclausen@users.noreply.github.com> Date: Tue, 30 Jun 2026 08:46:25 -0600 Subject: [PATCH] chore: bump harfrust to 0.11.0 and fix shape() API drift harfrust 0.11 replaces Shaper::shape's `&[Feature]` argument with a ShapeOptions builder. Update the ligature test shaping call to ShapeOptions::new().features(&off) and refresh Cargo.lock. All other workspace dependencies were already at their latest patch. --- Cargo.lock | 44 ++++++++++++++++++++++++++++++++++++++------ Cargo.toml | 2 +- frext/src/font.rs | 4 ++-- 3 files changed, 41 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1d120b3..5fc4067 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -831,8 +831,8 @@ dependencies = [ "ecolor", "emath", "epaint_default_fonts", - "font-types", - "harfrust", + "font-types 0.11.3", + "harfrust 0.7.0", "log", "nohash-hasher", "parking_lot", @@ -948,6 +948,15 @@ dependencies = [ "serde", ] +[[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" @@ -1018,7 +1027,7 @@ dependencies = [ "egui_extras", "env_logger", "fontdb", - "harfrust", + "harfrust 0.11.0", "log", "regex", "rfd", @@ -1221,7 +1230,19 @@ checksum = "0431e8e389aa0f1e72bb9d1c2db8957a1a7a3580e8ed97db819c14837aac9b3e" dependencies = [ "bitflags 2.13.0", "bytemuck", - "read-fonts", + "read-fonts 0.39.2", + "smallvec", +] + +[[package]] +name = "harfrust" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3ba1ee6b7b39a19f97aff9425483783340c646f579bd7abedf0036e776654a" +dependencies = [ + "bitflags 2.13.0", + "bytemuck", + "read-fonts 0.40.2", "smallvec", ] @@ -2361,7 +2382,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4ed38b89c2c77ff968c524145ad65fb010f38af5c7a224b53b81d47ac2daa81" dependencies = [ "bytemuck", - "font-types", + "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]] @@ -2686,7 +2718,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c34617370ae968efb7161bb2beb517d9084659aae19e24b89e3db25b46e4564" dependencies = [ "bytemuck", - "read-fonts", + "read-fonts 0.39.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 6e38ae1..5cc2177 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ egui = { version = "0.35.0", default-features = false } egui_extras = { version = "0.35.0", default-features = false, features = ["svg"] } env_logger = "0.11.11" fontdb = "0.23.0" -harfrust = "0.7.0" +harfrust = "0.11.0" log = "0.4.33" regex = "1.12.4" rfd = "0.17.2" diff --git a/frext/src/font.rs b/frext/src/font.rs index 8d64b37..c948b39 100644 --- a/frext/src/font.rs +++ b/frext/src/font.rs @@ -240,7 +240,7 @@ mod tests { Color32, FontFamily, FontId, epaint::text::{Fonts, TextOptions}, }; - use harfrust::{Feature, ShaperData, Tag, UnicodeBuffer}; + use harfrust::{Feature, ShapeOptions, ShaperData, Tag, UnicodeBuffer}; /// The embedded face must be non-empty. A truncated/zero-length copy is /// the most likely asset accident; a malformed TTF is caught instead when @@ -307,7 +307,7 @@ mod tests { Feature::new(Tag::new(b"clig"), value, ..), Feature::new(Tag::new(b"rclt"), value, ..), ]; - let glyphs = shaper.shape(buffer, &off); + let glyphs = shaper.shape(buffer, ShapeOptions::new().features(&off)); glyphs .glyph_infos() .iter()