Skip to content

Commit 17d159a

Browse files
committed
Go back to splitting paragraphs correctly
1 parent e6cc1d9 commit 17d159a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/core/textlayout/sharedparley.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ pub fn layout(text: &str, scale_factor: f32, options: LayoutOptions) -> Layout {
105105
}
106106

107107
let mut layout: parley::Layout<Brush> = builder.build(text);
108-
layout.break_all_lines(options.max_width.map(|max_width| max_width.get()));
108+
layout.break_all_lines(options.max_width.map(|max_width| max_width.get() * scale_factor));
109109
layout.align(
110-
options.max_width.map(|max_width| max_width.get()),
110+
options.max_width.map(|max_width| max_width.get() * scale_factor),
111111
match options.horizontal_align {
112112
TextHorizontalAlignment::Left => parley::Alignment::Left,
113113
TextHorizontalAlignment::Center => parley::Alignment::Middle,

0 commit comments

Comments
 (0)