Skip to content

Commit

Permalink
add +1 only to width
Browse files Browse the repository at this point in the history
  • Loading branch information
cospectrum committed Oct 19, 2024
1 parent 945ceb2 commit e2643c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drawing/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn layout_glyphs(
let h = font.height().ceil();
assert!(w >= 0.0);
assert!(h >= 0.0);
(1 + w as u32, 1 + h as u32)
(1 + w as u32, h as u32)
}

/// Get the width and height of the given text, rendered with the given font and scale.
Expand Down

0 comments on commit e2643c3

Please sign in to comment.