Support configurable LineHeight in text widgets

This commit is contained in:
Héctor Ramón Jiménez 2023-05-04 13:00:16 +02:00
parent 8e8808f0e1
commit 9499a8f9e6
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
24 changed files with 337 additions and 42 deletions

View file

@ -352,18 +352,26 @@ impl backend::Text for Backend {
&self,
contents: &str,
size: f32,
line_height: core::text::LineHeight,
font: Font,
bounds: Size,
shaping: core::text::Shaping,
) -> (f32, f32) {
self.text_pipeline
.measure(contents, size, font, bounds, shaping)
self.text_pipeline.measure(
contents,
size,
line_height,
font,
bounds,
shaping,
)
}
fn hit_test(
&self,
contents: &str,
size: f32,
line_height: core::text::LineHeight,
font: Font,
bounds: Size,
shaping: core::text::Shaping,
@ -373,6 +381,7 @@ impl backend::Text for Backend {
self.text_pipeline.hit_test(
contents,
size,
line_height,
font,
bounds,
shaping,