diff options
author | 2023-05-02 00:58:33 +0200 | |
---|---|---|
committer | 2023-05-02 01:02:33 +0200 | |
commit | edf3432bf5176be13437b9fd5d25b890ec9dbe69 (patch) | |
tree | 6acba55171f28af1a3c9c4e65a99ad10abc11c65 /wgpu | |
parent | 4bd290afe7d81d9aaf7467b3ce91491f6600261a (diff) | |
download | iced-edf3432bf5176be13437b9fd5d25b890ec9dbe69.tar.gz iced-edf3432bf5176be13437b9fd5d25b890ec9dbe69.tar.bz2 iced-edf3432bf5176be13437b9fd5d25b890ec9dbe69.zip |
Update `glyphon` and `cosmic-text`
Diffstat (limited to 'wgpu')
-rw-r--r-- | wgpu/Cargo.toml | 2 | ||||
-rw-r--r-- | wgpu/src/text.rs | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index 254d32d6..6934ae49 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -44,7 +44,7 @@ path = "../graphics" [dependencies.glyphon] version = "0.2" git = "https://github.com/hecrj/glyphon.git" -rev = "446cf0803065b52ba5fb9a30fe0addb6d7b5f9d9" +rev = "504aa8a9a1fb42726f02fa244b70119e7ca25933" [dependencies.encase] version = "0.3.0" diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs index fc126125..ad7bdc8d 100644 --- a/wgpu/src/text.rs +++ b/wgpu/src/text.rs @@ -311,6 +311,13 @@ fn to_stretch(stretch: font::Stretch) -> glyphon::Stretch { } } +fn to_shaping(shaping: Shaping) -> glyphon::Shaping { + match shaping { + Shaping::Basic => glyphon::Shaping::Basic, + Shaping::Advanced => glyphon::Shaping::Advanced, + } +} + struct Cache { entries: FxHashMap<KeyHash, glyphon::Buffer>, recently_used: FxHashSet<KeyHash>, @@ -369,7 +376,7 @@ impl Cache { .family(to_family(key.font.family)) .weight(to_weight(key.font.weight)) .stretch(to_stretch(key.font.stretch)), - matches!(key.shaping, Shaping::Basic), + to_shaping(key.shaping), ); let _ = entry.insert(buffer); |