- XftFontClose(Display::display, _xftfont);
-}
-
-
-void Font::drawString(XftDraw *d, int x, int y, const Color &color,
- const userstring &string) const
-{
- assert(d);
-
- if (_shadow) {
- XftColor c;
- c.color.red = 0;
- c.color.green = 0;
- c.color.blue = 0;
- c.color.alpha = _tint | _tint << 8; // transparent shadow
- c.pixel = BlackPixel(Display::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());
- }
-
- XftColor c;
- c.color.red = color.red() | color.red() << 8;
- c.color.green = color.green() | color.green() << 8;
- c.color.blue = color.blue() | color.blue() << 8;
- c.pixel = color.pixel();
- c.color.alpha = 0xff | 0xff << 8; // no transparency in Color yet
-
- if (string.utf8())
- XftDrawStringUtf8(d, &c, _xftfont, x, _xftfont->ascent + y,
- (FcChar8*)string.c_str(), string.size());
- else
- XftDrawString8(d, &c, _xftfont, x, _xftfont->ascent + y,
- (FcChar8*)string.c_str(), string.size());
-
- return;