From 8b55442b2e0893f3064e88c4372bd0ecf00ba830 Mon Sep 17 00:00:00 2001 From: Scott Moynes Date: Thu, 17 Oct 2002 02:59:30 +0000 Subject: [PATCH] use drop shadow height in the font height. honour rc file config option for drop shadows with new shadow code --- src/Font.cc | 4 ++-- src/Screen.cc | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Font.cc b/src/Font.cc index e2649f10..ea70933a 100644 --- a/src/Font.cc +++ b/src/Font.cc @@ -331,7 +331,7 @@ unsigned int BFont::measureString(const string &string) const { _display, _xftfont, (XftChar8 *) string.c_str(), string.size(), &info); - return info.xOff + (_shadow ? 1 : 0); + return info.xOff + (_shadow ? _offset : 0); } #endif // XFT @@ -350,7 +350,7 @@ unsigned int BFont::height(void) const { #ifdef XFT if (_xftfont) - return _xftfont->height + (_shadow ? 1 : 0); + return _xftfont->height + (_shadow ? _offset : 0); #endif // XFT if (i18n.multibyte()) diff --git a/src/Screen.cc b/src/Screen.cc index f691cf6e..70494cab 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -2757,7 +2757,8 @@ BFont *BScreen::readDatabaseFont(const string &rbasename, BFont *b = new BFont(blackbox->getXDisplay(), this, family, i, bold, - italic, dropShadow, offset, tint, resource.aa_fonts); + italic, dropShadow && resource.shadow_fonts, offset, + tint, resource.aa_fonts); if (b->valid()) return b; else -- 2.45.2