]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed endless recursion for loading of default font
authorKarsten Ballüder <ballueder@usa.net>
Fri, 12 Nov 1999 16:31:33 +0000 (16:31 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Fri, 12 Nov 1999 16:31:33 +0000 (16:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/fontutil.cpp

index 8bdd44191eb31d1ed4290d4aad258d4f5a776b0c..be3861a14944a30b914ba9d5ff5b683cc47507ae 100644 (file)
 #elif defined(__WXGTK__)
     static inline wxNativeFont wxLoadFont(const wxString& fontSpec)
     {
-        return gdk_font_load( wxConvertWX2MB(fontSpec) );
+       wxNativeFont font = gdk_font_load( wxConvertWX2MB(fontSpec) );
+       if(fontSpec == "-*-*-*-*-*-*-*-*-*-*-*-*-*-*")
+       {
+          if(font == NULL)
+             font = gdk_font_load (wxConvertWX2MB("-*-*-*-*-*-*-*-*-75-*-*-*-*-*"));
+          if(font == NULL)
+             font = gdk_font_load (wxConvertWX2MB("-*-*-*-*-*-*-*-*-100-*-*-*-*-*"));
+          if(font == NULL)
+             font = gdk_font_load (wxConvertWX2MB("-*-fixed-*-*-*-*-*-*-*-*-*-*-*-*"));
+       }
+       return font;
     }
 
     static inline void wxFreeFont(wxNativeFont font)