update to cosmic-text 0.12 and rustc-hash 2.0 (#104)

This commit is contained in:
Billy Messenger 2024-07-08 07:52:33 -05:00 committed by GitHub
parent 2a45708767
commit 47f4126f99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -10,9 +10,9 @@ license = "MIT OR Apache-2.0 OR Zlib"
[dependencies] [dependencies]
wgpu = { version = "0.20", default-features = false, features = ["wgsl"] } wgpu = { version = "0.20", default-features = false, features = ["wgsl"] }
etagere = "0.2.10" etagere = "0.2.10"
cosmic-text = "0.11" cosmic-text = "0.12"
lru = { version = "0.12.1", default-features = false } lru = { version = "0.12.1", default-features = false }
rustc-hash = "1.1" rustc-hash = "2.0"
[dev-dependencies] [dev-dependencies]
winit = { version = "0.29.10", features = ["rwh_05"] } winit = { version = "0.29.10", features = ["rwh_05"] }

View file

@ -74,7 +74,11 @@ async fn run() {
let physical_width = (width as f64 * scale_factor) as f32; let physical_width = (width as f64 * scale_factor) as f32;
let physical_height = (height 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.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, false); buffer.shape_until_scroll(&mut font_system, false);