Fix buffer size issue
This commit is contained in:
parent
a0b301e422
commit
f6c85b5238
1 changed files with 13 additions and 11 deletions
24
src/lib.rs
24
src/lib.rs
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue