+ bool bold, bool italic, bool shadow, bool antialias) :
+ _display(d),
+ _screen(screen),
+ _family(family),
+ _simplename(False),
+ _size(size),
+ _bold(bold),
+ _italic(italic),
+ _antialias(antialias),
+ _shadow(shadow),
+ _xftfont(0),
+ _font(0),
+ _fontset(0),
+ _fontset_extents(0) {
+ _valid = False;
+
+ _xftfont = XftFontOpen(_display, _screen->getScreenNumber(),
+ XFT_FAMILY, XftTypeString, _family.c_str(),
+ XFT_SIZE, XftTypeInteger, _size,
+ XFT_WEIGHT, XftTypeInteger, (_bold ?
+ XFT_WEIGHT_BOLD :
+ XFT_WEIGHT_MEDIUM),
+ XFT_SLANT, XftTypeInteger, (_italic ?
+ XFT_SLANT_ITALIC :
+ XFT_SLANT_ROMAN),
+ XFT_ANTIALIAS, XftTypeBool, _antialias,
+ 0);
+ if (! _xftfont)
+ return; // failure
+
+ _font = XLoadQueryFont(_display, buildXlfd().c_str());
+ if (! _font)
+ return; // failure
+
+ _valid = True;