X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=render%2Ffont.c;h=57d838e105d269ad4583c5112258ab472f3ecae2;hb=99d0b716776492c1927b8248375ce82a33bc7b26;hp=066f4771e4dbedba32fcf0577e7cfc8494f5c39a;hpb=1bb7a5f8838bff12d846718330bb72a38f5f34df;p=chaz%2Fopenbox diff --git a/render/font.c b/render/font.c index 066f4771..57d838e1 100644 --- a/render/font.c +++ b/render/font.c @@ -2,13 +2,12 @@ #include "color.h" #include "mask.h" #include "theme.h" -#include "kernel/geom.h" -#include "kernel/gettext.h" -#define _(str) gettext(str) +#include "gettext.h" #include #include #include +#include #define ELIPSES "..." #define ELIPSES_LENGTH(font) \ @@ -65,7 +64,6 @@ static RrFont *openfont(const RrInstance *inst, char *fontstring) if (FcPatternGetBool(match, OB_SHADOW, 0, &out->shadow) != FcResultMatch) out->shadow = FALSE; - g_message("shadow %d", out->shadow); if (FcPatternGetInteger(match, OB_SHADOW_OFFSET, 0, &out->offset) != FcResultMatch) @@ -79,6 +77,7 @@ static RrFont *openfont(const RrInstance *inst, char *fontstring) font = XftFontOpenPattern(RrDisplay(inst), match); if (!font) { + FcPatternDestroy(match); g_free(out); return NULL; } else @@ -148,7 +147,7 @@ int RrFontMaxCharWidth(const RrFont *f) return (signed) f->xftfont->max_advance_width; } -void RrFontDraw(XftDraw *d, RrTextureText *t, Rect *area) +void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area) { gint x,y,w,h; XftColor c;