Fix examples

This commit is contained in:
Héctor Ramón Jiménez 2023-04-21 20:35:59 +02:00
parent a5c548b12f
commit 0dce8b75d1
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
use cosmic_text::{Attrs, Buffer, Color, FontSystem, Metrics, SwashCache};
use cosmic_text::{Attrs, Buffer, Color, FontSystem, Metrics, Shaping, SwashCache};
use std::cmp::{self, Ordering};
use termion::{color, cursor};
@ -28,7 +28,7 @@ fn main() {
let attrs = Attrs::new();
// Add some text!
buffer.set_text(" Hi, Rust! 🦀", attrs);
buffer.set_text(" Hi, Rust! 🦀", attrs, Shaping::Advanced);
// Perform shaping as desired
buffer.shape_until_scroll();