From: Dana Jansens Date: Wed, 21 May 2003 22:17:36 +0000 (+0000) Subject: pass the number of bytes, not characters to the xft draw functions X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=9b2a67d0445c5741c361ed03210bdb357d444708;p=chaz%2Fopenbox pass the number of bytes, not characters to the xft draw functions --- diff --git a/render/font.c b/render/font.c index 504063b9..9d3a1321 100644 --- a/render/font.c +++ b/render/font.c @@ -1,12 +1,12 @@ -#include "../kernel/openbox.h" #include "font.h" - -#include "../kernel/gettext.h" +#include "kernel/openbox.h" +#include "kernel/geom.h" +#include "kernel/gettext.h" #define _(str) gettext(str) #include #include -#include "../kernel/geom.h" +#include #define ELIPSES "..." #define ELIPSES_LENGTH(font, shadow, offset) \ @@ -167,7 +167,7 @@ void font_draw(XftDraw *d, TextureText *t, Rect *position) } XftDrawStringUtf8(d, &c, t->font->xftfont, x + t->offset, t->font->xftfont->ascent + y + t->offset, - (FcChar8*)text->str, l); + (FcChar8*)text->str, strlen(text->str)); } c.color.red = t->color->r | t->color->r << 8; c.color.green = t->color->g | t->color->g << 8; @@ -177,6 +177,6 @@ void font_draw(XftDraw *d, TextureText *t, Rect *position) XftDrawStringUtf8(d, &c, t->font->xftfont, x, t->font->xftfont->ascent + y, - (FcChar8*)text->str, l); + (FcChar8*)text->str, strlen(text->str)); return; }