]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/font.cpp
fixed incorrect XtVaXXX() function call (thanks to g++ 4 for detecting this!)
[wxWidgets.git] / src / x11 / font.cpp
index 573951a98bf40afc43d57adaf0f104713bf214e8..08742ac42ef3439f0839ba4cf9146d5b2762705b 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "font.h"
-#endif
-
 #ifdef __VMS
 #pragma message disable nosimpint
 #include "wx/vms_x_fix.h"
@@ -202,7 +198,7 @@ void wxFontRefData::Init(int pointSize,
         case wxFONTFAMILY_TELETYPE:
            pango_font_description_set_family( m_nativeFontInfo.description, "monospace" );
            break;
-        case wxFONTFAMILY_SWISS:
+        case wxFONTFAMILY_ROMAN:
            pango_font_description_set_family( m_nativeFontInfo.description, "serif" );
            break;
         default:
@@ -526,14 +522,8 @@ void wxFontRefData::SetNativeFontInfo(const wxNativeFontInfo& info)
 // wxFont
 // ----------------------------------------------------------------------------
 
-void wxFont::Init()
-{
-}
-
 wxFont::wxFont(const wxNativeFontInfo& info)
 {
-    Init();
-
 #if wxUSE_UNICODE
     Create( info.GetPointSize(),
             info.GetFamily(),
@@ -884,6 +874,9 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const
     }
 
     wxString xFontName = M_FONTDATA->m_nativeFontInfo.GetXFontName();
+    if (xFontName == "-*-*-*-*-*--*-*-*-*-*-*-*-*")
+      // wxFont constructor not called with native font info parameter => take M_FONTDATA values
+      xFontName.Clear();
     
     // not found, create a new one
     XFontStruct *font = (XFontStruct *)