From feef9f5630c2adb3528937e55f7bfad2da561a65 Mon Sep 17 00:00:00 2001 From: Billy Messenger <60663878+BillyDM@users.noreply.github.com> Date: Mon, 8 Jul 2024 07:52:33 -0500 Subject: [PATCH] update to cosmic-text 0.12 and rustc-hash 2.0 (#104) --- Cargo.toml | 4 ++-- examples/hello-world.rs | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a55efb2..785c2a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,9 @@ license = "MIT OR Apache-2.0 OR Zlib" [dependencies] wgpu = { version = "0.19", default-features = false, features = ["wgsl"] } etagere = "0.2.10" -cosmic-text = "0.10" +cosmic-text = "0.12" lru = { version = "0.12.1", default-features = false } -rustc-hash = "1.1" +rustc-hash = "2.0" [dev-dependencies] winit = { version = "0.29.10", features = ["rwh_05"] } diff --git a/examples/hello-world.rs b/examples/hello-world.rs index c7f7732..c977c6e 100644 --- a/examples/hello-world.rs +++ b/examples/hello-world.rs @@ -82,9 +82,13 @@ async fn run() { let physical_width = (width as f64 * scale_factor) as f32; let physical_height = (height as f64 * scale_factor) as f32; - buffer.set_size(&mut font_system, physical_width, physical_height); + buffer.set_size( + &mut font_system, + Some(physical_width), + Some(physical_height), + ); buffer.set_text(&mut font_system, "Hello world! 👋\nThis is rendered with 🦅 glyphon 🦁\nThe text below should be partially clipped.\na b c d e f g h i j k l m n o p q r s t u v w x y z", Attrs::new().family(Family::SansSerif), Shaping::Advanced); - buffer.shape_until_scroll(&mut font_system); + buffer.shape_until_scroll(&mut font_system, false); event_loop .run(move |event, target| {