]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dcclient.cpp
Applied patch [ 666379 ] CalCtrl doesn't use best sizes for the year combobox
[wxWidgets.git] / src / gtk / dcclient.cpp
index d36b26b870c1c42e9f7e8a9a23dfc961d45cf8b4..5f1953872d2fbd0a0a7d627d2632177601fd06b3 100644 (file)
@@ -1492,6 +1492,10 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
 
     if (!m_window) return;
 
+#ifdef __WXGTK20__
+    // implement later without GdkFont for GTK 2.0
+    return;
+#endif
     GdkFont *font = m_font.GetInternalFont( m_scaleY );
 
     wxCHECK_RET( font, wxT("invalid font") );
@@ -1732,14 +1736,17 @@ void wxWindowDC::SetFont( const wxFont &font )
 
     m_font = font;
 #ifdef __WXGTK20__
-    m_fontdesc = m_font.GetNativeFontInfo()->description;
-   
-    if (m_owner)
+    if (m_font.Ok())
     {
-        if (m_font.GetNoAntiAliasing())
-            m_context = m_owner->GtkGetPangoX11Context();
-        else
-            m_context = m_owner->GtkGetPangoDefaultContext();
+        m_fontdesc = m_font.GetNativeFontInfo()->description;
+   
+        if (m_owner)
+        {
+            if (m_font.GetNoAntiAliasing())
+                m_context = m_owner->GtkGetPangoX11Context();
+            else
+                m_context = m_owner->GtkGetPangoDefaultContext();
+        }
     }
 #endif
 }