From bffe572a045af6f06b307dbab300233a476c4d32 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 10 Jan 2025 23:36:45 +0100 Subject: Fix text wrapping for `rich_text` --- graphics/src/text/paragraph.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'graphics') diff --git a/graphics/src/text/paragraph.rs b/graphics/src/text/paragraph.rs index d1e23c00..48c8e9e6 100644 --- a/graphics/src/text/paragraph.rs +++ b/graphics/src/text/paragraph.rs @@ -124,6 +124,8 @@ impl core::text::Paragraph for Paragraph { Some(text.bounds.height), ); + buffer.set_wrap(font_system.raw(), text::to_wrap(text.wrapping)); + buffer.set_rich_text( font_system.raw(), text.content.iter().enumerate().map(|(i, span)| { -- cgit