X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=render%2Ffont.c;h=a099c0930812a01bffb2b0be794a817a6f2e43cc;hb=06fb4c7382a9c2a25e74adefbbc267417af5aadd;hp=67e19ec240831874c73eb4fc629e6d6d4f81cbf5;hpb=7f44ed53628bd27421fbe73c72cc3398d6e287aa;p=chaz%2Fopenbox diff --git a/render/font.c b/render/font.c index 67e19ec2..a099c093 100644 --- a/render/font.c +++ b/render/font.c @@ -2,9 +2,7 @@ #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 @@ -135,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) @@ -149,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; @@ -228,5 +226,7 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, Rect *area) XftDrawStringUtf8(d, &c, t->font->xftfont, x, t->font->xftfont->ascent + y, (FcChar8*)text->str, l); + + g_string_free(text, TRUE); return; }