From 77d416b2fdd4663012c1159e200e604ff8974f7e Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 26 Oct 2022 15:21:30 -0600 Subject: [PATCH] Add ligatures and increase text size for rich text example --- examples/rich-text/src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/rich-text/src/main.rs b/examples/rich-text/src/main.rs index 73b0266..abb72e5 100644 --- a/examples/rich-text/src/main.rs +++ b/examples/rich-text/src/main.rs @@ -25,7 +25,7 @@ fn main() { let mut buffer = TextBuffer::new( &font_system, attrs, - TextMetrics::new(20, 28) + TextMetrics::new(32, 44) ); buffer.set_size( @@ -42,7 +42,13 @@ fn main() { ("B", attrs.weight(Weight::BOLD)), ("old ", attrs), ("I", attrs.style(Style::Italic)), - ("talic", attrs), + ("talic ", attrs), + ("f", attrs), + ("i ", attrs), + ("f", attrs.weight(Weight::BOLD)), + ("i ", attrs), + ("f", attrs.style(Style::Italic)), + ("i ", attrs), ("\n", attrs), ("Sans-Serif Normal ", attrs), ("Sans-Serif Bold ", attrs.weight(Weight::BOLD)),