We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a66aa2d commit 80aea5aCopy full SHA for 80aea5a
internal/renderers/skia/textlayout.rs
@@ -162,6 +162,16 @@ pub fn create_layout(
162
let mut paragraph = builder.build();
163
paragraph.layout(max_width.map_or(f32::MAX, |physical_width| physical_width.get()));
164
165
+ // If without line breaking the text would be longer than the given max_width, lay out again
166
+ // without line breaks.
167
+ if wrap == items::TextWrap::NoWrap || overflow == items::TextOverflow::Elide {
168
+ if let Some(physical_width) = max_width {
169
+ if paragraph.max_intrinsic_width() > physical_width.get() {
170
+ paragraph.layout(f32::MAX);
171
+ }
172
173
174
+
175
let layout_height = PhysicalLength::new(paragraph.height());
176
177
let layout_top_y = match v_align {
0 commit comments