]> git.lyx.org Git - lyx.git/blobdiff - src/font.h
Fix fuer #209
[lyx.git] / src / font.h
index ed578aa3454288b7a2b9d5d187e14bf55d98985f..51d50e93d6d692c1a35701135ec8d0d95e8cdd04 100644 (file)
@@ -56,13 +56,13 @@ struct lyxfont {
        static
        int width(string const & s, LyXFont const & f) {
                if (s.empty()) return 0;
-               return width(s.c_str(), s.length(), f);
+               return width(s.data(), s.length(), f);
        }
        ///
-       static
-       int width(char const * s, LyXFont const & f) {
-               return width(s, strlen(s), f);
-       }
+       //static
+       //int width(char const * s, LyXFont const & f) {
+       //      return width(s, strlen(s), f);
+       //}
        ///
        static
        int signedWidth(string const & s, LyXFont const & f);
@@ -78,6 +78,15 @@ struct lyxfont {
        ///
        static
        void XSetFont(Display * display, GC gc, LyXFont const & f);
+       // A couple of more high-level metrics
+       ///
+       static
+       void rectText(string const & str, LyXFont const & font,
+                     int & width, int & ascent, int & descent);
+       ///
+       static
+       void buttonText(string const & str, LyXFont const & font,
+                       int & width, int & ascent, int & descent);
 };
 
 //} // end of namespace font