-string BFont::_fallback_font = "fixed";
-
-BFont::BFont(Display *d, BScreen *screen, const string &family, int size,
- bool bold, bool italic, bool shadow, unsigned char offset,
- unsigned char tint, bool antialias) :
- _display(d),
- _screen(screen),
- _family(family),
- _simplename(False),
- _size(size),
- _bold(bold),
- _italic(italic),
- _antialias(antialias),
- _shadow(shadow),
- _offset(offset),
- _tint(tint),
- _xftfont(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
-
- _valid = True;