use drop shadow height in the font height.
authorScott Moynes <smoynes@nexus.carleton.ca>
Thu, 17 Oct 2002 02:59:30 +0000 (02:59 +0000)
committerScott Moynes <smoynes@nexus.carleton.ca>
Thu, 17 Oct 2002 02:59:30 +0000 (02:59 +0000)
honour rc file config option for drop shadows with new shadow code

src/Font.cc
src/Screen.cc

index e2649f1..ea70933 100644 (file)
@@ -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())
index f691cf6..70494ca 100644 (file)
@@ -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