diff options
author | okan | 2008-07-11 14:21:28 +0000 |
---|---|---|
committer | okan | 2008-07-11 14:21:28 +0000 |
commit | a3e52a291110ce7b866a0d11eeda1619d25f952b (patch) | |
tree | 781c99337b95a8386d0e787a95a49bf97148621c /font.c | |
parent | dc3045573c35f2ee31dc1c012da1ff4408b6f264 (diff) | |
download | cwm-a3e52a291110ce7b866a0d11eeda1619d25f952b.tar.gz |
spacing, declaration lineup to be consistent throughout cwm,
readability, and a bit of knf.
ok oga@
Diffstat (limited to 'font.c')
-rw-r--r-- | font.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -22,7 +22,7 @@ void font_init(struct screen_ctx *sc) { - XColor xcolor, tmp; + XColor xcolor, tmp; sc->xftdraw = XftDrawCreate(X_Dpy, sc->rootwin, DefaultVisual(X_Dpy, sc->which), DefaultColormap(X_Dpy, sc->which)); @@ -43,7 +43,8 @@ font_init(struct screen_ctx *sc) int font_width(const char *text, int len) { - XGlyphInfo extents; + XGlyphInfo extents; + XftTextExtents8(X_Dpy, Conf.DefaultFont, (const XftChar8*)text, len, &extents); @@ -63,9 +64,9 @@ font_draw(struct screen_ctx *sc, const char *text, int len, XftFont * font_make(struct screen_ctx *sc, const char *name) { - XftFont *fn = NULL; - FcPattern *pat, *patx; - XftResult res; + XftFont *fn = NULL; + FcPattern *pat, *patx; + XftResult res; if ((pat = FcNameParse(name)) == NULL) return (NULL); |