#ifdef XFT
BFont::BFont(Display *d, BScreen *screen, const string &family, int size,
- bool bold, bool italic, bool antialias) :
+ bool bold, bool italic, bool shadow, bool antialias) :
_display(d),
_screen(screen),
_family(family),
_bold(bold),
_italic(italic),
_antialias(antialias),
+ _shadow(shadow),
_xftfont(0),
_font(0),
_fontset(0),
_screen(screen),
#ifdef XFT
_antialias(False),
+ _shadow(False),
_xftfont(0),
#endif // XFT
_font(0),
_screen->getColormap());
assert(draw);
+ if (_shadow) {
+ XftColor c;
+ c.color.red = 0;
+ c.color.green = 0;
+ c.color.blue = 0;
+ c.color.alpha = 0x55 | 0x55 << 8; // transparent shadow
+ c.pixel = BlackPixel(_display, _screen->getScreenNumber());
+
+
+ XftDrawStringUtf8(draw, &c, _xftfont, x - 1, _xftfont->ascent + y + 1,
+ (XftChar8 *) string.c_str(), string.size());
+ }
+
XftColor c;
c.color.red = color.red() | color.red() << 8;
c.color.green = color.green() | color.green() << 8;
#ifdef XFT
bool _antialias;
+ bool _shadow;
XftFont *_xftfont;
#ifdef XFT
// loads an Xft font
BFont(Display *d, BScreen *screen, const std::string &family, int size,
- bool bold, bool italic, bool antialias = True);
+ bool bold, bool italic, bool shadow, bool antialias = True);
#endif
// loads a standard X font
BFont(Display *d, BScreen *screen, const std::string &xlfd);
}
+void BScreen::saveShadowFonts(bool f) {
+ resource.shadow_fonts = f;
+ reconfigure();
+ config->setValue(screenstr + "dropShadowFonts", resource.shadow_fonts);
+}
+
+
void BScreen::saveHideToolbar(bool h) {
resource.hide_toolbar = h;
if (resource.hide_toolbar)
saveSloppyFocus(resource.sloppy_focus);
saveAutoRaise(resource.auto_raise);
saveImageDither(doImageDither());
+ saveShadowFonts(resource.shadow_fonts);
saveAAFonts(resource.aa_fonts);
saveResizeZones(resource.resize_zones);
saveOpaqueMove(resource.opaque_move);
if (! config->getValue(screenstr + "opaqueMove", resource.opaque_move))
resource.opaque_move = false;
+ if (! config->getValue(screenstr + "dropShadowFonts", resource.shadow_fonts))
+ resource.shadow_fonts = true;
+
if (! config->getValue(screenstr + "antialiasFonts", resource.aa_fonts))
resource.aa_fonts = true;
}
BFont *b = new BFont(blackbox->getXDisplay(), this, family, i, bold,
- italic, resource.aa_fonts);
+ italic, resource.shadow_fonts, resource.aa_fonts);
if (b->valid())
return b;
else
bool sloppy_focus, auto_raise, auto_edge_balance, ordered_dither,
opaque_move, full_max, focus_new, focus_last, click_raise,
allow_scroll_lock, hide_toolbar, window_corner_snap, aa_fonts,
- ignore_shaded, ignore_maximized, workspace_warping;
+ ignore_shaded, ignore_maximized, workspace_warping, shadow_fonts;
int snap_to_windows, snap_to_edges;
unsigned int snap_offset;
inline bool doAutoRaise(void) const { return resource.auto_raise; }
inline bool doClickRaise(void) const { return resource.click_raise; }
inline bool isScreenManaged(void) const { return managed; }
+ inline bool doShadowFonts(void) const { return resource.shadow_fonts; }
inline bool doAAFonts(void) const { return resource.aa_fonts; }
inline bool doImageDither(void) const { return image_control->doDither(); }
inline bool doOrderedDither(void) const { return resource.ordered_dither; }
void saveSnapOffset(int o);
void saveResistanceSize(int s);
void saveImageDither(bool d);
+ void saveShadowFonts(bool f);
void saveAAFonts(bool f);
void saveOpaqueMove(bool o);
void saveFullMax(bool f);