X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=render%2Ffont.c;h=a099c0930812a01bffb2b0be794a817a6f2e43cc;hb=fa55dc4bb1a349cfb3a55f7d0f85b03d6fa0e09f;hp=d2a4acaeed31e0b8177d4903489d136a3b913581;hpb=58be655de321369ceec5819a3516003a05ead575;p=chaz%2Fopenbox diff --git a/render/font.c b/render/font.c index d2a4acae..a099c093 100644 --- a/render/font.c +++ b/render/font.c @@ -7,6 +7,7 @@ #include #include #include +#include #define ELIPSES "..." #define ELIPSES_LENGTH(font) \ @@ -132,7 +133,7 @@ int RrFontMeasureString(const RrFont *f, const gchar *str) { gint x, y; font_measure_full (f, str, &x, &y); - return x; + return x + 4; } int RrFontHeight(const RrFont *f) @@ -225,5 +226,7 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area) XftDrawStringUtf8(d, &c, t->font->xftfont, x, t->font->xftfont->ascent + y, (FcChar8*)text->str, l); + + g_string_free(text, TRUE); return; }