]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/dcclient.cpp
Doc tweaks
[wxWidgets.git] / src / x11 / dcclient.cpp
index 286a7018ca4a5092a4e9a6dbeda4ae32cb6c3721..37b47a4dbfba56cfb27e246f879f004d4ac88e77 100644 (file)
 
 #include "wx/x11/private.h"
 
-#include <math.h>
+#include "wx/math.h"
 
 #if wxUSE_UNICODE
 #include "glib.h"
 #include "pango/pangox.h"
-#include "pango/pangoxft.h"
+#ifdef HAVE_PANGO_XFT
+    #include "pango/pangoxft.h"
+#endif
 
 #include "pango_x.cpp"
 #endif
@@ -1769,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 )