text: Reset max font size on newline
Before this patch, max font size (which claimed to be the highest font size observed within the current line) was calculated for each span, regardless of newlines.
This commit is contained in:
parent
fcbeb92406
commit
8722642ed7
|
@ -418,6 +418,7 @@ impl<'a, 'gc> LayoutContext<'a, 'gc> {
|
|||
|
||||
self.is_first_line = true;
|
||||
self.has_line_break = true;
|
||||
self.max_font_size = Twips::from_pixels(self.current_line_span.font.size);
|
||||
}
|
||||
|
||||
/// Adjust the text layout cursor down to the next line.
|
||||
|
@ -446,6 +447,7 @@ impl<'a, 'gc> LayoutContext<'a, 'gc> {
|
|||
|
||||
self.is_first_line = false;
|
||||
self.has_line_break = true;
|
||||
self.max_font_size = Twips::from_pixels(self.current_line_span.font.size);
|
||||
}
|
||||
|
||||
/// Adjust the text layout cursor in response to a tab.
|
||||
|
|
Loading…
Reference in New Issue