mirror of
https://git.suckless.org/dwm
synced 2024-12-27 03:16:32 +00:00
update draw.c
This commit is contained in:
parent
e7d41cc188
commit
04797343db
1 changed files with 5 additions and 5 deletions
10
draw.c
10
draw.c
|
@ -126,13 +126,13 @@ loadfont(DC *dc, const char *fontstr) {
|
|||
|
||||
if(!*fontstr)
|
||||
return False;
|
||||
if((dc->font.set = XCreateFontSet(dc->dpy, fontstr, &missing, &n, &def))) {
|
||||
if((dc->font.set = XCreateFontSet(dc->dpy, fontstr, &missing, &n, &def)))
|
||||
n = XFontsOfFontSet(dc->font.set, &xfonts, &names);
|
||||
}
|
||||
else {
|
||||
dc->font.xfont = XLoadQueryFont(dc->dpy, fontstr);
|
||||
else if((dc->font.xfont = XLoadQueryFont(dc->dpy, fontstr)))
|
||||
xfonts = &dc->font.xfont;
|
||||
}
|
||||
else
|
||||
n = 0;
|
||||
|
||||
for(i = 0; i < n; i++) {
|
||||
dc->font.ascent = MAX(dc->font.ascent, xfonts[i]->ascent);
|
||||
dc->font.descent = MAX(dc->font.descent, xfonts[i]->descent);
|
||||
|
|
Loading…
Reference in a new issue