1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 15:13:12 -04:00

Include pixels_per_point in galley cache key

This commit is contained in:
valadaptive
2025-07-05 06:10:23 -04:00
parent 9aaee3354d
commit a113907005

View File

@@ -13,7 +13,7 @@ use crate::{
font::{Font, FontImpl, GlyphInfo},
},
};
use emath::NumExt as _;
use emath::{NumExt as _, OrderedFloat};
#[cfg(feature = "default_fonts")]
use epaint_default_fonts::{EMOJI_ICON, HACK_REGULAR, NOTO_EMOJI_REGULAR, UBUNTU_LIGHT};
@@ -872,7 +872,7 @@ impl GalleyCache {
job.wrap.max_width = job.wrap.max_width.round();
}
let hash = crate::util::hash(&job); // TODO(emilk): even faster hasher?
let hash = crate::util::hash((&job, OrderedFloat(pixels_per_point))); // TODO(emilk): even faster hasher?
let galley = match self.cache.entry(hash) {
std::collections::hash_map::Entry::Occupied(entry) => {