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 | |
| parent | added draw.h, draw.c (diff) | |
| download | dwm-04797343db457578906355cf1118548be90a183e.tar.gz dwm-04797343db457578906355cf1118548be90a183e.zip | |
update draw.c
Diffstat (limited to '')
| -rw-r--r-- | draw.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -126,13 +126,13 @@ loadfont(DC *dc, const char *fontstr) { | |||
| 126 | 126 | ||
| 127 | if(!*fontstr) | 127 | if(!*fontstr) |
| 128 | return False; | 128 | return False; |
| 129 | if((dc->font.set = XCreateFontSet(dc->dpy, fontstr, &missing, &n, &def))) { | 129 | if((dc->font.set = XCreateFontSet(dc->dpy, fontstr, &missing, &n, &def))) |
| 130 | n = XFontsOfFontSet(dc->font.set, &xfonts, &names); | 130 | n = XFontsOfFontSet(dc->font.set, &xfonts, &names); |
| 131 | } | 131 | else if((dc->font.xfont = XLoadQueryFont(dc->dpy, fontstr))) |
| 132 | else { | ||
| 133 | dc->font.xfont = XLoadQueryFont(dc->dpy, fontstr); | ||
| 134 | xfonts = &dc->font.xfont; | 132 | xfonts = &dc->font.xfont; |
| 135 | } | 133 | else |
| 134 | n = 0; | ||
| 135 | |||
| 136 | for(i = 0; i < n; i++) { | 136 | for(i = 0; i < n; i++) { |
| 137 | dc->font.ascent = MAX(dc->font.ascent, xfonts[i]->ascent); | 137 | dc->font.ascent = MAX(dc->font.ascent, xfonts[i]->ascent); |
| 138 | dc->font.descent = MAX(dc->font.descent, xfonts[i]->descent); | 138 | dc->font.descent = MAX(dc->font.descent, xfonts[i]->descent); |
