diff --git a/examples/rich-text/src/main.rs b/examples/rich-text/src/main.rs index f569884..b5d1ab4 100644 --- a/examples/rich-text/src/main.rs +++ b/examples/rich-text/src/main.rs @@ -2,7 +2,7 @@ use cosmic_text::{ Action, Attrs, AttrsList, Buffer, BufferLine, Color, Edit, Editor, Family, FontSystem, Metrics, - Style, SwashCache, Weight, + Shaping, Style, SwashCache, Weight, }; use orbclient::{EventOption, Renderer, Window, WindowFlag}; use std::{ @@ -143,7 +143,7 @@ fn main() { editor .buffer_mut() .lines - .push(BufferLine::new(line_text, attrs_list)); + .push(BufferLine::new(line_text, attrs_list, Shaping::Advanced)); } let mut swash_cache = SwashCache::new(); diff --git a/examples/terminal/src/main.rs b/examples/terminal/src/main.rs index 852207f..d5fbeda 100644 --- a/examples/terminal/src/main.rs +++ b/examples/terminal/src/main.rs @@ -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();