]> Dogcows Code - chaz/openbox/commitdiff
pass the number of bytes, not characters to the xft draw functions
authorDana Jansens <danakj@orodu.net>
Wed, 21 May 2003 22:17:36 +0000 (22:17 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 21 May 2003 22:17:36 +0000 (22:17 +0000)
render/font.c

index 504063b9e9b5efc0590c2fa217cdb3452f024974..9d3a1321a2842d1a5de56e621e8ed31dffe89d4f 100644 (file)
@@ -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 <X11/Xft/Xft.h>
 #include <glib.h>
-#include "../kernel/geom.h"
+#include <string.h>
 
 #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;
 }
This page took 0.025074 seconds and 4 git commands to generate.