From fa725c69d55330c1577502bdbeb75b9cc753b7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 27 Nov 2019 21:42:35 +0100 Subject: [PATCH] font: ceil and scale glyph horizontal advance --- font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/font.c b/font.c index de1dc1e..d0a95f9 100644 --- a/font.c +++ b/font.c @@ -4,7 +4,7 @@ #include #include #include -//#include +#include #include #include @@ -581,7 +581,7 @@ glyph_for_wchar(const struct font *font, wchar_t wc, struct glyph *glyph) .pix = pix, .x = font->face->glyph->bitmap_left * font->pixel_size_fixup, .y = font->face->glyph->bitmap_top * font->pixel_size_fixup, - .x_advance = font->face->glyph->advance.x / 64, + .x_advance = ceil(font->face->glyph->advance.x / 64) * font->pixel_size_fixup, .width = width, .height = rows, .valid = true,