]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/font.cpp
wxVariant is in wxBase so should be forward declared using WXDLLIMPEXP_BASE and not...
[wxWidgets.git] / src / x11 / font.cpp
index 5018bc39ed6dfaf9b19a3f66b21cae8b3721a1a0..783a009b74bffc37a1a3257efdbd7781051a30d8 100644 (file)
@@ -883,6 +883,11 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const
         node = node->GetNext();
     }
 
+    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 *)
                         wxLoadQueryNearestFont(pointSize,
@@ -891,7 +896,8 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const
                                                M_FONTDATA->m_weight,
                                                M_FONTDATA->m_underlined,
                                                wxT(""),
-                                               M_FONTDATA->m_encoding);
+                                               M_FONTDATA->m_encoding,
+                                               & xFontName);
 
     if ( !font )
     {