applied yiyus initfont fix
This commit is contained in:
parent
d094ebea96
commit
56f9e26b72
1 changed files with 3 additions and 4 deletions
5
dmenu.c
5
dmenu.c
|
@ -298,10 +298,9 @@ initfont(const char *fontstr) {
|
||||||
if(dc.font.xfont)
|
if(dc.font.xfont)
|
||||||
XFreeFont(dpy, dc.font.xfont);
|
XFreeFont(dpy, dc.font.xfont);
|
||||||
dc.font.xfont = NULL;
|
dc.font.xfont = NULL;
|
||||||
if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))) {
|
if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))
|
||||||
if(!(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
|
&& !(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
|
||||||
eprint("error, cannot load font: '%s'\n", fontstr);
|
eprint("error, cannot load font: '%s'\n", fontstr);
|
||||||
}
|
|
||||||
dc.font.ascent = dc.font.xfont->ascent;
|
dc.font.ascent = dc.font.xfont->ascent;
|
||||||
dc.font.descent = dc.font.xfont->descent;
|
dc.font.descent = dc.font.xfont->descent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue