Xinqi Bao's Git
projects
/
dmenu.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
11cb2e7
)
fixed fallback
author
Anselm R. Garbe <
[email protected]
>
Sat, 15 Sep 2007 18:28:20 +0000
(20:28 +0200)
committer
Anselm R. Garbe <
[email protected]
>
Sat, 15 Sep 2007 18:28:20 +0000
(20:28 +0200)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
bf53763
..
fcabf01
100644
(file)
--- 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)
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;
}
dc.font.ascent = dc.font.xfont->ascent;
dc.font.descent = dc.font.xfont->descent;
}