]> Dogcows Code - chaz/openbox/blobdiff - otk/font.cc
blef
[chaz/openbox] / otk / font.cc
index a9f2fd3ee352e41220a7b49bfcd2e80a5e9e4edc..a38946f02ad4efc3efccf72e5ea71c92de714154 100644 (file)
@@ -51,8 +51,9 @@ Font::Font(int screen_num, const std::string &fontstring,
       ::exit(3);
     }
     int version = XftGetVersion();
-    printf(_("Using Xft %d.%d.%d.\n"),
-           version / 10000 % 100, version / 100 % 100, version % 100);
+    printf(_("Using Xft %d.%d.%d (Built against %d.%d.%d).\n"),
+           version / 10000 % 100, version / 100 % 100, version % 100,
+           XFT_MAJOR, XFT_MINOR, XFT_REVISION);
     _xft_init = true;
   }
 
@@ -97,11 +98,11 @@ void Font::drawString(XftDraw *d, int x, int y, const Color &color,
     if (string.utf8())
       XftDrawStringUtf8(d, &c, _xftfont, x + _offset,
                         _xftfont->ascent + y + _offset,
-                        (FcChar8*)string.c_str(), string.size());
+                        (FcChar8*)string.c_str(), string.bytes());
     else
       XftDrawString8(d, &c, _xftfont, x + _offset,
                      _xftfont->ascent + y + _offset,
-                     (FcChar8*)string.c_str(), string.size());
+                     (FcChar8*)string.c_str(), string.bytes());
   }
     
   XftColor c;
@@ -113,10 +114,10 @@ void Font::drawString(XftDraw *d, int x, int y, const Color &color,
 
   if (string.utf8())
     XftDrawStringUtf8(d, &c, _xftfont, x, _xftfont->ascent + y,
-                      (FcChar8*)string.c_str(), string.size());
+                      (FcChar8*)string.c_str(), string.bytes());
   else
     XftDrawString8(d, &c, _xftfont, x, _xftfont->ascent + y,
-                   (FcChar8*)string.c_str(), string.size());
+                   (FcChar8*)string.c_str(), string.bytes());
 
   return;
 }
@@ -128,10 +129,10 @@ unsigned int Font::measureString(const ustring &string) const
 
   if (string.utf8())
     XftTextExtentsUtf8(**display, _xftfont,
-                       (FcChar8*)string.c_str(), string.size(), &info);
+                       (FcChar8*)string.c_str(), string.bytes(), &info);
   else
     XftTextExtents8(**display, _xftfont,
-                    (FcChar8*)string.c_str(), string.size(), &info);
+                    (FcChar8*)string.c_str(), string.bytes(), &info);
 
   return info.xOff + (_shadow ? _offset : 0);
 }
This page took 0.02322 seconds and 4 git commands to generate.