#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 <X11/Xft/Xft.h>
#include <glib.h>
#include <string.h>
+#include <stdlib.h>
#define ELIPSES "..."
#define ELIPSES_LENGTH(font) \
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)
font = XftFontOpenPattern(RrDisplay(inst), match);
if (!font) {
+ FcPatternDestroy(match);
g_free(out);
return NULL;
} else
{
gint x, y;
font_measure_full (f, str, &x, &y);
- return x;
+ return x + 4;
}
int RrFontHeight(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;
XftDrawStringUtf8(d, &c, t->font->xftfont, x,
t->font->xftfont->ascent + y,
(FcChar8*)text->str, l);
+
+ g_string_free(text, TRUE);
return;
}