]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/font.cpp
Rich text lib separation.
[wxWidgets.git] / src / motif / font.cpp
index f4653d60ade41486526cbbe0aed7420cd027a843..b16a93e08536e26bd9c696b1d79fd7cfdf0abdb0 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/string.h"
+    #include "wx/utils.h"       // for wxGetDisplay()
+    #include "wx/settings.h"
+    #include "wx/gdicmn.h"
 #endif
 
-#include "wx/gdicmn.h"
-#include "wx/utils.h"       // for wxGetDisplay()
 #include "wx/fontutil.h"    // for wxNativeFontInfo
 #include "wx/tokenzr.h"
-#include "wx/settings.h"
 #include "wx/motif/private.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
@@ -393,12 +393,14 @@ void wxFont::SetWeight(int weight)
     M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now
 }
 
-void wxFont::SetFaceName(const wxString& faceName)
+bool wxFont::SetFaceName(const wxString& faceName)
 {
     Unshare();
 
     M_FONTDATA->m_faceName = faceName;
     M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now
+
+    return wxFontBase::SetFaceName(faceName);
 }
 
 void wxFont::SetUnderlined(bool underlined)
@@ -673,7 +675,7 @@ void wxGetTextExtent(WXDisplay* display, const wxFont& font,
 
     int direction, ascent2, descent2;
     XCharStruct overall;
-    int slen = str.Len();
+    int slen = str.length();
 
     XTextExtents((XFontStruct*) pFontStruct, (char*) str.c_str(), slen,
                  &direction, &ascent2, &descent2, &overall);