Fix clipping of text in iced_tiny_skia
This commit is contained in:
parent
52bd0d4138
commit
c6cf2bc521
2 changed files with 49 additions and 42 deletions
|
|
@ -98,12 +98,7 @@ pub fn measure(buffer: &cosmic_text::Buffer) -> Size {
|
|||
(run.line_w.max(width), total_lines + 1)
|
||||
});
|
||||
|
||||
let (max_width, max_height) = buffer.size();
|
||||
|
||||
Size::new(
|
||||
width.min(max_width),
|
||||
(total_lines as f32 * buffer.metrics().line_height).min(max_height),
|
||||
)
|
||||
Size::new(width, total_lines as f32 * buffer.metrics().line_height)
|
||||
}
|
||||
|
||||
/// Returns the attributes of the given [`Font`].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue