summaryrefslogtreecommitdiff
path: root/app/cwm/font.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/cwm/font.c')
-rw-r--r--app/cwm/font.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/cwm/font.c b/app/cwm/font.c
index 0322d50f7..0f58c8242 100644
--- a/app/cwm/font.c
+++ b/app/cwm/font.c
@@ -33,11 +33,11 @@ font_init(struct screen_ctx *sc)
}
int
-font_width(const char *text, int len)
+font_width(struct screen_ctx *sc, const char *text, int len)
{
XGlyphInfo extents;
- XftTextExtents8(X_Dpy, Conf.DefaultFont, (const XftChar8*)text,
+ XftTextExtents8(X_Dpy, sc->font, (const XftChar8*)text,
len, &extents);
return (extents.xOff);
@@ -49,7 +49,7 @@ font_draw(struct screen_ctx *sc, const char *text, int len,
{
XftDrawChange(sc->xftdraw, d);
/* Really needs to be UTF8'd. */
- XftDrawString8(sc->xftdraw, &sc->xftcolor, Conf.DefaultFont, x, y,
+ XftDrawString8(sc->xftdraw, &sc->xftcolor, sc->font, x, y,
(const FcChar8*)text, len);
}