Fix example
This commit is contained in:
parent
4da780b8f2
commit
469adc63a4
3 changed files with 20 additions and 73 deletions
|
@ -69,7 +69,7 @@ impl Default for MyApp {
|
|||
|
||||
buffer.set_size(&mut font_system, 16.0, 9.0);
|
||||
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, true);
|
||||
Self {
|
||||
font_system: Arc::new(Mutex::new(font_system)),
|
||||
buffer: Arc::new(RwLock::new(buffer)),
|
||||
|
@ -99,7 +99,7 @@ impl eframe::App for MyApp {
|
|||
let mut buffer = self.buffer.write();
|
||||
buffer.set_metrics(&mut font_system, Metrics::new(self.size, self.size));
|
||||
buffer.set_size(&mut font_system, size.x, size.y);
|
||||
buffer.shape_until_scroll(&mut font_system);
|
||||
buffer.shape_until_scroll(&mut font_system, true);
|
||||
}
|
||||
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue