Merge pull request #7454 from penpot/elenatorro-12247-fix-line-height-min-value

🔧 Allow line height values from 0 to 1
This commit is contained in:
Elena Torró 2025-10-07 12:29:16 +02:00 committed by GitHub
commit a1b8eb7074
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -475,7 +475,7 @@ impl Paragraph {
.unwrap_or(&self.children[0]);
let mut strut_style = skia::textlayout::StrutStyle::default();
let line_height = self.line_height.max(1.0);
let line_height = self.line_height.max(0.0);
strut_style.set_font_size(reference_child.font_size);
strut_style.set_height(line_height);
strut_style.set_height_override(true);