try to load fixed font if other fails
This commit is contained in:
parent
9dce41e194
commit
6e7eb17404
3
config.c
3
config.c
|
@ -416,7 +416,8 @@ initfont(const char *fontstr, Display * disp, DC * drawcontext)
|
||||||
if(drawcontext->font.xfont)
|
if(drawcontext->font.xfont)
|
||||||
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")))
|
||||||
eprint("error, cannot load font: '%s'\n", fontstr);
|
eprint("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