fix font loading on failure

This commit is contained in:
Julien Danjou 2007-09-19 18:00:21 +02:00
parent 5fe5f90e49
commit 8965fd87d2
1 changed files with 1 additions and 1 deletions

View File

@ -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;