optimize it a bit
Dana Jansens danakj@orodu.net
1 files changed,
4 insertions(+),
2 deletions(-)
jump to
M
render/font.c
→
render/font.c
@@ -151,6 +151,8 @@ x = position->x + (w - m) / 2;
break; } + l = strlen(text->str); /* number of bytes */ + if (t->shadow) { if (t->tint >= 0) { c.color.red = 0;@@ -167,7 +169,7 @@ c.pixel = WhitePixel(ob_display, ob_screen);
} XftDrawStringUtf8(d, &c, t->font->xftfont, x + t->offset, t->font->xftfont->ascent + y + t->offset, - (FcChar8*)text->str, strlen(text->str)); + (FcChar8*)text->str, l); } c.color.red = t->color->r | t->color->r << 8; c.color.green = t->color->g | t->color->g << 8;@@ -177,6 +179,6 @@ c.pixel = t->color->pixel;
XftDrawStringUtf8(d, &c, t->font->xftfont, x, t->font->xftfont->ascent + y, - (FcChar8*)text->str, strlen(text->str)); + (FcChar8*)text->str, l); return; }