]> git.saurik.com Git - wxWidgets.git/commitdiff
Blind patch for SetFont() in Unicode mode for wxX11.
authorRobert Roebling <robert@roebling.de>
Sat, 5 Feb 2005 12:49:08 +0000 (12:49 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 5 Feb 2005 12:49:08 +0000 (12:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/x11/dcclient.cpp

index 8cbaf34a0dc31cc022ff7751a7f1c4c8c2366c21..37b47a4dbfba56cfb27e246f879f004d4ac88e77 100644 (file)
@@ -1771,6 +1771,16 @@ void wxWindowDC::SetFont( const wxFont &font )
     wxCHECK_RET( Ok(), wxT("invalid dc") );
 
     m_font = font;
+    
+#if wxUSE_UNICODE
+    if (m_font.Ok())
+    {
+        if (m_fontdesc)
+            pango_font_description_free( m_fontdesc );
+
+        m_fontdesc = pango_font_description_copy( m_font.GetNativeFontInfo()->description );
+    }
+#endif
 }
 
 void wxWindowDC::SetPen( const wxPen &pen )