mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 20:35:42 +02:00
font: ceil and scale glyph horizontal advance
This commit is contained in:
parent
303b61a2e6
commit
fa725c69d5
1 changed files with 2 additions and 2 deletions
4
font.c
4
font.c
|
@ -4,7 +4,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <wchar.h>
|
||||
//#include <math.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
#include <threads.h>
|
||||
|
||||
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue