Merge pull request #6491 from penpot/alotor-perf-pixel-precision

 Pixel precision for new renderer
This commit is contained in:
Aitor Moreno
2025-05-22 11:37:11 +02:00
committed by GitHub
8 changed files with 76 additions and 22 deletions

View File

@@ -594,6 +594,13 @@ pub fn auto_width(paragraphs: &[Vec<skia::textlayout::Paragraph>]) -> f32 {
})
}
pub fn max_width(paragraphs: &[Vec<skia::textlayout::Paragraph>]) -> f32 {
paragraphs
.iter()
.flatten()
.fold(0.0, |max_width, p| f32::max(p.max_width(), max_width))
}
pub fn auto_height(paragraphs: &[Vec<skia::textlayout::Paragraph>]) -> f32 {
paragraphs
.iter()