diff options
author | 2024-02-11 04:03:01 +0100 | |
---|---|---|
committer | 2024-02-11 04:03:01 +0100 | |
commit | c6cf2bc5210d606a00ade5ecf53237cacd4a92f5 (patch) | |
tree | 72e3dcd803abf10d3f8706e5fcef4bea7b5f98f0 /graphics | |
parent | 52bd0d41389527d606c2e21cb402b73ca43a713a (diff) | |
download | iced-c6cf2bc5210d606a00ade5ecf53237cacd4a92f5.tar.gz iced-c6cf2bc5210d606a00ade5ecf53237cacd4a92f5.tar.bz2 iced-c6cf2bc5210d606a00ade5ecf53237cacd4a92f5.zip |
Fix clipping of text in `iced_tiny_skia`
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/src/text.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/graphics/src/text.rs b/graphics/src/text.rs index 7c4b5e31..217a23e2 100644 --- a/graphics/src/text.rs +++ b/graphics/src/text.rs @@ -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`]. |