workaround for shitty libxft issue
This commit is contained in:
parent
99dfaf066f
commit
3c68c3efa9
6
x.c
6
x.c
|
@ -1063,7 +1063,11 @@ xloadfont(Font *f, FcPattern *pattern)
|
||||||
f->rbearing = f->match->max_advance_width;
|
f->rbearing = f->match->max_advance_width;
|
||||||
|
|
||||||
f->height = f->ascent + f->descent;
|
f->height = f->ascent + f->descent;
|
||||||
f->width = DIVCEIL(extents.xOff, strlen(ascii_printable));
|
//f->width = DIVCEIL(extents.xOff, strlen(ascii_printable));
|
||||||
|
unsigned short xoff = extents.xOff;
|
||||||
|
signed xdelta = xoff - extents.width;
|
||||||
|
_Bool isnewfont = abs(xdelta) > 18;
|
||||||
|
f->width = DIVCEIL(isnewfont ? xoff / 3 : xoff, strlen(ascii_printable));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue