font: ceil:ing the top value seems to look better when scaled

This commit is contained in:
Daniel Eklöf 2019-11-30 23:30:48 +01:00
parent 5ab35a38d5
commit 7b4dbf384c
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
font.c
View file

@ -580,7 +580,7 @@ glyph_for_wchar(const struct font *font, wchar_t wc, struct glyph *glyph)
.cols = wcwidth(wc), .cols = wcwidth(wc),
.pix = pix, .pix = pix,
.x = font->face->glyph->bitmap_left * font->pixel_size_fixup, .x = font->face->glyph->bitmap_left * font->pixel_size_fixup,
.y = font->face->glyph->bitmap_top * font->pixel_size_fixup, .y = ceil(font->face->glyph->bitmap_top * font->pixel_size_fixup),
.x_advance = ceil(font->face->glyph->advance.x / 64) * font->pixel_size_fixup, .x_advance = ceil(font->face->glyph->advance.x / 64) * font->pixel_size_fixup,
.width = width, .width = width,
.height = rows, .height = rows,