aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/display.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/display.rs b/src/display.rs
index eb562e8f..bdd9a9f2 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -247,8 +247,8 @@ impl Display {
});
let metrics = cache.font_metrics();
- self.size_info.cell_width = (metrics.average_advance + config.font().offset().x as f64) as f32;
- self.size_info.cell_height = (metrics.line_height + config.font().offset().y as f64) as f32;
+ self.size_info.cell_width = ((metrics.average_advance + config.font().offset().x as f64) as f32).floor();
+ self.size_info.cell_height = ((metrics.line_height + config.font().offset().y as f64) as f32).floor();
}
#[inline]