diff options
author | okan <okan> | 2008-07-11 14:21:28 +0000 |
---|---|---|
committer | okan <okan> | 2008-07-11 14:21:28 +0000 |
commit | b23fad398789ed8d7412813e5b178a38a6667ee7 (patch) | |
tree | 4abba8dd92715e6dc2a272a487b00542b06d40db /font.c | |
parent | 734f45ab4bdaf25835e90a56a1803de23ff49975 (diff) | |
download | cwm-b23fad398789ed8d7412813e5b178a38a6667ee7.tar.gz cwm-b23fad398789ed8d7412813e5b178a38a6667ee7.tar.xz cwm-b23fad398789ed8d7412813e5b178a38a6667ee7.zip |
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
diff --git a/font.c b/font.c index 85f54e5..ea200e5 100644 --- a/font.c +++ b/font.c @@ -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); |