Skip to content

Commit

Permalink
Adjust width for fonts that Xft thinks are too wide
Browse files Browse the repository at this point in the history
  • Loading branch information
planet36 committed May 6, 2021
1 parent 5b6bff6 commit df1d6f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,8 @@ xloadfont(Font *f, FcPattern *pattern)

f->height = f->ascent + f->descent;
f->width = DIVCEIL(extents.xOff, strlen(ascii_printable));
if (extents.xOff > extents.width)
f->width -= extents.xOff - extents.width;

return 0;
}
Expand Down

0 comments on commit df1d6f3

Please sign in to comment.