Update cosmic-text to 0.19

This commit is contained in:
Héctor Ramón Jiménez 2026-04-23 19:43:09 +09:00
parent 1d68895e9c
commit e429a025df
No known key found for this signature in database
5 changed files with 9 additions and 15 deletions

View file

@ -82,12 +82,8 @@ impl WindowState {
let physical_width = (physical_size.width as f64 * scale_factor) as f32;
let physical_height = (physical_size.height as f64 * scale_factor) as f32;
text_buffer.set_size(
&mut font_system,
Some(physical_width),
Some(physical_height),
);
text_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, None);
text_buffer.set_size(Some(physical_width), Some(physical_height));
text_buffer.set_text("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, None);
text_buffer.shape_until_scroll(&mut font_system, false);
Self {
@ -179,7 +175,7 @@ impl winit::application::ApplicationHandler for Application {
atlas,
viewport,
[TextArea {
buffer: text_buffer,
text: text_buffer.layout_runs(),
left: 10.0,
top: 10.0,
scale: 1.0,