summaryrefslogtreecommitdiffstats
path: root/wgpu/src/backend.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-04 13:00:16 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-04 18:39:31 +0200
commit9499a8f9e6f9971dedfae563cb133232aa3cebc2 (patch)
tree54074dd8b1fc17d63ad92d84b6d2b4415ad29df6 /wgpu/src/backend.rs
parent8e8808f0e187ed6671441f5016f07bfcba426452 (diff)
downloadiced-9499a8f9e6f9971dedfae563cb133232aa3cebc2.tar.gz
iced-9499a8f9e6f9971dedfae563cb133232aa3cebc2.tar.bz2
iced-9499a8f9e6f9971dedfae563cb133232aa3cebc2.zip
Support configurable `LineHeight` in text widgets
Diffstat (limited to '')
-rw-r--r--wgpu/src/backend.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs
index 6b847aff..def80a81 100644
--- a/wgpu/src/backend.rs
+++ b/wgpu/src/backend.rs
@@ -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,