#endif // XFT
_font(0),
_fontset(0),
- _fontset_extents(0),
- _cache(0),
- _item(0) {
+ _fontset_extents(0) {
_valid = init();
}
#endif // XFT
_font(0),
_fontset(0),
- _fontset_extents(0),
- _cache(0),
- _item(0) {
+ _fontset_extents(0) {
string int_xlfd;
if (xlfd.empty())
int_xlfd = _fallback_font;
if (_xftfont)
return True;
- cerr << "BFont::BFont(): couldn't load font '" << _name << "'" << endl <<
- "as an Xft font, trying as a standard X font." << endl;
+ cerr << "BFont::BFont(): couldn't load font '" << _name <<
+ "' as an Xft font, trying as a standard X font." << endl;
#endif
if (i18n.multibyte()) {
XFreeFontSet(_display, _fontset);
if (_font)
XFreeFont(_display, _font);
-
- if (_item)
- _cache->release(_item);
}
}
#endif // XFT
- if (! _cache)
- _cache = color.display()->gcCache();
- if (! _item)
- _item = _cache->find(color, _font, GXcopy, ClipByChildren);
+ BGCCache *_cache = color.display()->gcCache();
+ BGCCacheItem *_item = _cache->find(color, _font, GXcopy, ClipByChildren);
assert(_cache);
assert(_item);
XDrawString(_display, d, _item->gc(),
x, _font->ascent + y,
string.c_str(), string.size());
+
+ _cache->release(_item);
}