From: Anselm R. Garbe Date: Sat, 15 Sep 2007 18:28:20 +0000 (+0200) Subject: fixed fallback X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=b97783b07feae30f9df12c1a720d17a2dc877018;p=dmenu.git fixed fallback --- diff --git a/main.c b/main.c index bf53763..fcabf01 100644 --- a/main.c +++ b/main.c @@ -160,8 +160,10 @@ initfont(const char *fontstr) { if(dc.font.xfont) XFreeFont(dpy, dc.font.xfont); dc.font.xfont = NULL; - if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))) - eprint("error, cannot load font: '%s'\n", fontstr); + if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))) { + if(!(dc.font.xfont = XLoadQueryFont(dpy, "fixed"))) + eprint("error, cannot load font: '%s'\n", fontstr); + } dc.font.ascent = dc.font.xfont->ascent; dc.font.descent = dc.font.xfont->descent; }