diff --git a/graphics/src/text/paragraph.rs b/graphics/src/text/paragraph.rs index 3432ab73..9cda9cb0 100644 --- a/graphics/src/text/paragraph.rs +++ b/graphics/src/text/paragraph.rs @@ -186,7 +186,8 @@ impl core::text::Paragraph for Paragraph { Some(new_bounds.height), ); - let (min_bounds, _has_rtl) = text::measure(¶graph.buffer); + let min_bounds = + align(&mut paragraph.buffer, &mut font_system, paragraph.align_x); paragraph.bounds = new_bounds; paragraph.min_bounds = min_bounds; @@ -376,6 +377,8 @@ fn align( } needs_relayout = true; + } else if let Some(line) = buffer.lines.first_mut() { + needs_relayout = line.set_align(None); } }