use a BPen in the BFont class for drawing standard X fonts
This commit is contained in:
parent
0c04fb5260
commit
235d9e4c40
1 changed files with 3 additions and 9 deletions
12
src/Font.cc
12
src/Font.cc
|
@ -275,22 +275,16 @@ void BFont::drawString(Drawable d, int x, int y, const BColor &color,
|
|||
}
|
||||
#endif // XFT
|
||||
|
||||
BGCCache *_cache = color.display()->gcCache();
|
||||
BGCCacheItem *_item = _cache->find(color, _font, GXcopy, ClipByChildren);
|
||||
|
||||
assert(_cache);
|
||||
assert(_item);
|
||||
BPen pen(color, _font);
|
||||
|
||||
if (i18n.multibyte())
|
||||
XmbDrawString(_display, d, _fontset, _item->gc(),
|
||||
XmbDrawString(_display, d, _fontset, pen.gc(),
|
||||
x, y - _fontset_extents->max_ink_extent.y,
|
||||
string.c_str(), string.size());
|
||||
else
|
||||
XDrawString(_display, d, _item->gc(),
|
||||
XDrawString(_display, d, pen.gc(),
|
||||
x, _font->ascent + y,
|
||||
string.c_str(), string.size());
|
||||
|
||||
_cache->release(_item);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue