Skip to content

Commit

Permalink
Fix wonky font. (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
skejeton authored Oct 23, 2022
1 parent 72242e0 commit 51badb0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/font.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,6 @@ static f_glyph f_iterator_next_glyph(f_iterator *iter) {
rect.x += iter->initX;
rect.y += iter->initY;

// NOTE(skejeton): Fixes wonkiness in nearest neighbour scale,
// I highly doubt this would be desired in cases of precision however..
rect.x = floor(rect.x);
rect.y = floor(rect.y);
rect.w = floor(rect.w);
rect.h = floor(rect.h);

th_quad q = {0};
q.v[0] = (th_vf2){{rect.x, rect.y}};
q.v[1] = (th_vf2){{rect.x+rect.w, rect.y}};
Expand Down Expand Up @@ -246,7 +239,7 @@ th_font *th_font_load(char *path, double size, uint32_t filter) {

font->scale = scale; // scale
font->ascent = ascent; // ascent
font->descent = descent; // ascent
font->descent = descent; // descent
}

return font;
Expand Down

0 comments on commit 51badb0

Please sign in to comment.