fix font loading on failure
This commit is contained in:
parent
5fe5f90e49
commit
8965fd87d2
2
config.c
2
config.c
|
@ -456,7 +456,7 @@ initfont(const char *fontstr, Display * disp, DC * drawcontext)
|
||||||
XFreeFont(disp, drawcontext->font.xfont);
|
XFreeFont(disp, drawcontext->font.xfont);
|
||||||
drawcontext->font.xfont = NULL;
|
drawcontext->font.xfont = NULL;
|
||||||
if(!(drawcontext->font.xfont = XLoadQueryFont(disp, fontstr))
|
if(!(drawcontext->font.xfont = XLoadQueryFont(disp, fontstr))
|
||||||
|| !(drawcontext->font.xfont = XLoadQueryFont(disp, "fixed")))
|
&& !(drawcontext->font.xfont = XLoadQueryFont(disp, "fixed")))
|
||||||
die("awesome: error, cannot load font: '%s'\n", fontstr);
|
die("awesome: error, cannot load font: '%s'\n", fontstr);
|
||||||
drawcontext->font.ascent = drawcontext->font.xfont->ascent;
|
drawcontext->font.ascent = drawcontext->font.xfont->ascent;
|
||||||
drawcontext->font.descent = drawcontext->font.xfont->descent;
|
drawcontext->font.descent = drawcontext->font.xfont->descent;
|
||||||
|
|
Loading…
Reference in New Issue