Use lru for glyph caching

I noticed that the `RecentlyUsed` map was actually a `RecentlyInserted`
map. This caused panics when trying to reduce the initial texture atlas size and
dynamically increase it (coming in another PR!).
This commit is contained in:
Héctor Ramón Jiménez 2023-02-08 04:21:16 +01:00 committed by Josh Groves
parent bbe26f9c54
commit da4bb4af5c
5 changed files with 17 additions and 275 deletions

View file

@ -11,6 +11,7 @@ license = "MIT OR Apache-2.0 OR Zlib"
wgpu = "0.14.0"
etagere = "0.2.6"
cosmic-text = { git = "https://github.com/pop-os/cosmic-text", rev = "a5903bb", features = ["std", "swash"] }
lru = "0.9"
[dev-dependencies]
winit = "0.27.0"