Fix buffer size issue

This commit is contained in:
Isaac Mills 2024-04-19 11:58:27 -04:00
parent a0b301e422
commit f6c85b5238
Signed by: fnmain
GPG key ID: B67D7410F33A0F61

View file

@ -359,17 +359,19 @@ pub fn resolve_paragraphs<'a>(
size.y += image_size.y; size.y += image_size.y;
} }
paragraphs.iter_mut().for_each(|paragraph| { if align.is_some() {
if paragraph.image_urls.is_none() { paragraphs.iter_mut().for_each(|paragraph| {
paragraph if paragraph.image_urls.is_none() {
.relative_bounds paragraph
.set_width(size.x - paragraph.indent.indent); .relative_bounds
paragraph .set_width(size.x - paragraph.indent.indent);
.buffer paragraph
.set_size(font_system, size.x - paragraph.indent.indent, f32::MAX); .buffer
paragraph.buffer.shape_until_scroll(font_system, false); .set_size(font_system, size.x - paragraph.indent.indent, f32::MAX);
} paragraph.buffer.shape_until_scroll(font_system, false);
}); }
});
}
(size, paragraphs) (size, paragraphs)
} }