Adding workaround for Variable Fonts causing too wide letter spacing

This commit is contained in:
bakkeby 2021-04-21 15:48:31 +02:00
parent dbd1d6ece0
commit 08f137a8a0
3 changed files with 22 additions and 0 deletions

4
x.c
View file

@ -1025,7 +1025,11 @@ xloadfont(Font *f, FcPattern *pattern)
f->rbearing = f->match->max_advance_width;
f->height = f->ascent + f->descent;
#if WIDE_GLYPH_SPACING_PATCH
f->width = DIVCEIL(extents.xOff > 18 ? extents.xOff / 3 : extents.xOff, strlen(ascii_printable));
#else
f->width = DIVCEIL(extents.xOff, strlen(ascii_printable));
#endif //WIDE_GLYPH_SPACING_PATCH
return 0;
}