- c.pixel = BlackPixel(Display::display, _screen_num);
-
- XftDrawStringUtf8(d, &c, _xftfont, x + _offset,
- _xftfont->ascent + y + _offset,
- (FcChar8*)string.c_str(), string.size());
+ c.pixel = BlackPixel(**display, _screen_num);
+
+ if (string.utf8())
+ XftDrawStringUtf8(d, &c, _xftfont, x + _offset,
+ _xftfont->ascent + y + _offset,
+ (FcChar8*)string.c_str(), string.size());
+ else
+ XftDrawString8(d, &c, _xftfont, x + _offset,
+ _xftfont->ascent + y + _offset,
+ (FcChar8*)string.c_str(), string.size());