diff options
author | Connor Lane Smith <cls@lubutu.com> | 2011-05-21 20:26:26 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2011-05-21 20:26:26 +0100 |
commit | 04797343db457578906355cf1118548be90a183e (patch) | |
tree | 01b6b71684da6ed09821046700d5935f854fa394 /draw.c | |
parent | e7d41cc18824114300a09d3bdb26c536f30b466e (diff) |
update draw.c
Diffstat (limited to 'draw.c')
-rw-r--r-- | draw.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -126,13 +126,13 @@ loadfont(DC *dc, const char *fontstr) { if(!*fontstr) return False; - if((dc->font.set = XCreateFontSet(dc->dpy, fontstr, &missing, &n, &def))) { + if((dc->font.set = XCreateFontSet(dc->dpy, fontstr, &missing, &n, &def))) n = XFontsOfFontSet(dc->font.set, &xfonts, &names); - } - else { - dc->font.xfont = XLoadQueryFont(dc->dpy, fontstr); + else if((dc->font.xfont = XLoadQueryFont(dc->dpy, fontstr))) xfonts = &dc->font.xfont; - } + else + n = 0; + for(i = 0; i < n; i++) { dc->font.ascent = MAX(dc->font.ascent, xfonts[i]->ascent); dc->font.descent = MAX(dc->font.descent, xfonts[i]->descent); |