Skip to content

Commit

Permalink
codestyle: fix linting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
fritsstegmann authored and MultisampledNight committed Aug 20, 2023
1 parent 0cfb990 commit bc180a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/fonts/caching_shaper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,11 @@ impl CachingShaper {

pub fn font_base_dimensions(&mut self) -> (u64, u64) {
let (metrics, glyph_advance) = self.info();
let font_width = (glyph_advance + (self.options.width - self.options.size + 0.5)).floor() as u64;

let bare_font_height = (metrics.ascent + metrics.descent + metrics.leading).ceil();
let font_height = bare_font_height as i64 + self.linespace;
let font_width =
(glyph_advance + (self.options.width - self.options.size + 0.5)).floor() as u64;

(
font_width,
Expand Down

0 comments on commit bc180a6

Please sign in to comment.