diff options
author | 2023-04-19 02:00:45 +0200 | |
---|---|---|
committer | 2023-05-02 01:02:32 +0200 | |
commit | 4bd290afe7d81d9aaf7467b3ce91491f6600261a (patch) | |
tree | 906bfe10f6118c86429c3bb83a8ce742dccb170a /tiny_skia/src/backend.rs | |
parent | 33b5a900197e2798a393d6d9a0834039666eddbb (diff) | |
download | iced-4bd290afe7d81d9aaf7467b3ce91491f6600261a.tar.gz iced-4bd290afe7d81d9aaf7467b3ce91491f6600261a.tar.bz2 iced-4bd290afe7d81d9aaf7467b3ce91491f6600261a.zip |
Introduce `text::Shaping` enum and replace magic boolean
Diffstat (limited to '')
-rw-r--r-- | tiny_skia/src/backend.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tiny_skia/src/backend.rs b/tiny_skia/src/backend.rs index 0a06f8c9..3ef7e717 100644 --- a/tiny_skia/src/backend.rs +++ b/tiny_skia/src/backend.rs @@ -219,7 +219,7 @@ impl Backend { font, horizontal_alignment, vertical_alignment, - advanced_shape, + shaping, } => { let physical_bounds = (primitive.bounds() + translation) * scale_factor; @@ -239,7 +239,7 @@ impl Backend { *font, *horizontal_alignment, *vertical_alignment, - *advanced_shape, + *shaping, pixels, clip_mask, ); @@ -628,10 +628,10 @@ impl backend::Text for Backend { size: f32, font: Font, bounds: Size, - advanced_shape: bool, + shaping: text::Shaping, ) -> (f32, f32) { self.text_pipeline - .measure(contents, size, font, bounds, advanced_shape) + .measure(contents, size, font, bounds, shaping) } fn hit_test( @@ -640,18 +640,18 @@ impl backend::Text for Backend { size: f32, font: Font, bounds: Size, + shaping: text::Shaping, point: Point, nearest_only: bool, - advanced_shape: bool, ) -> Option<text::Hit> { self.text_pipeline.hit_test( contents, size, font, bounds, + shaping, point, nearest_only, - advanced_shape, ) } |