Skip to content

Commit

Permalink
Prevent over adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
mooman219 committed Sep 4, 2020
1 parent dc8670e commit 4772807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl Glyph {
if is_negative(offset_x) {
offset_x += 1.0;
}
let mut offset_y = ceil(height) - height - fract(bounds.ymin);
let mut offset_y = fract(1.0 - fract(height) - fract(bounds.ymin));
if is_negative(offset_y) {
offset_y += 1.0;
}
Expand Down Expand Up @@ -413,7 +413,7 @@ impl Font {
if is_negative(offset_x) {
offset_x += 1.0;
}
let mut offset_y = ceil(height) - height - fract(bounds.ymin);
let mut offset_y = fract(1.0 - fract(height) - fract(bounds.ymin));
if is_negative(offset_y) {
offset_y += 1.0;
}
Expand Down

0 comments on commit 4772807

Please sign in to comment.