Reuse entries in text::Cache in iced_wgpu
This commit is contained in:
parent
af62ec1c87
commit
78ad365db2
10 changed files with 69 additions and 46 deletions
|
|
@ -38,7 +38,7 @@ pub trait Text {
|
|||
font: Font,
|
||||
bounds: Size,
|
||||
shaping: text::Shaping,
|
||||
) -> (f32, f32);
|
||||
) -> Size;
|
||||
|
||||
/// Tests whether the provided point is within the boundaries of [`Text`]
|
||||
/// laid out with the given parameters, returning information about
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ where
|
|||
font: Font,
|
||||
bounds: Size,
|
||||
shaping: text::Shaping,
|
||||
) -> (f32, f32) {
|
||||
) -> Size {
|
||||
self.backend().measure(
|
||||
content,
|
||||
size,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue