Add ligatures and increase text size for rich text example

This commit is contained in:
Jeremy Soller 2022-10-26 15:21:30 -06:00
parent ea64291abb
commit 77d416b2fd
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE

View file

@ -25,7 +25,7 @@ fn main() {
let mut buffer = TextBuffer::new( let mut buffer = TextBuffer::new(
&font_system, &font_system,
attrs, attrs,
TextMetrics::new(20, 28) TextMetrics::new(32, 44)
); );
buffer.set_size( buffer.set_size(
@ -42,7 +42,13 @@ fn main() {
("B", attrs.weight(Weight::BOLD)), ("B", attrs.weight(Weight::BOLD)),
("old ", attrs), ("old ", attrs),
("I", attrs.style(Style::Italic)), ("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), ("\n", attrs),
("Sans-Serif Normal ", attrs), ("Sans-Serif Normal ", attrs),
("Sans-Serif Bold ", attrs.weight(Weight::BOLD)), ("Sans-Serif Bold ", attrs.weight(Weight::BOLD)),