Skip to content

Commit

Permalink
Make epaint pixel_per_point warning only trigger on same float diff a…
Browse files Browse the repository at this point in the history
…s fonts is doing
  • Loading branch information
StarStarJ committed Jan 7, 2024
1 parent 937c09f commit 8af3644
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/epaint/src/text/fonts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ impl Fonts {
pub fn begin_frame(&self, pixels_per_point: f32, max_texture_side: usize) {
let mut fonts_and_cache = self.0.lock();

let pixels_per_point_changed =
(fonts_and_cache.fonts.pixels_per_point - pixels_per_point).abs() > 1e-3;
let pixels_per_point_changed = fonts_and_cache.fonts.pixels_per_point != pixels_per_point;
let max_texture_side_changed = fonts_and_cache.fonts.max_texture_side != max_texture_side;
let font_atlas_almost_full = fonts_and_cache.fonts.atlas.lock().fill_ratio() > 0.8;
let needs_recreate =
Expand Down

0 comments on commit 8af3644

Please sign in to comment.