font: fix calculation of scaled glyph horizontal offset

This commit is contained in:
Daniel Eklöf 2019-11-27 21:42:16 +01:00
parent e837e71179
commit 303b61a2e6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
font.c
View file

@ -579,7 +579,7 @@ glyph_for_wchar(const struct font *font, wchar_t wc, struct glyph *glyph)
.wc = wc, .wc = wc,
.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 = font->face->glyph->bitmap_top * font->pixel_size_fixup,
.x_advance = font->face->glyph->advance.x / 64, .x_advance = font->face->glyph->advance.x / 64,
.width = width, .width = width,