#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
#if wxUSE_UNICODE
PangoLayout *layout = pango_layout_new( m_context );
- if (!m_fontdesc)
- {
- char *crash = NULL;
- *crash = 0;
- }
-
- pango_layout_set_font_description(layout, m_fontdesc);
+ if (m_fontdesc)
+ pango_layout_set_font_description(layout, m_fontdesc);
+ else
+ pango_layout_set_font_description(layout, this->GetFont().GetNativeFontInfo()->description);
+
pango_layout_set_text(layout, "H", 1 );
int w,h;
pango_layout_get_pixel_size(layout, &w, &h);
#if wxUSE_UNICODE
PangoLayout *layout = pango_layout_new( m_context );
- if (!m_fontdesc)
- {
- char *crash = NULL;
- *crash = 0;
- }
-
- pango_layout_set_font_description(layout, m_fontdesc);
-
+ if (m_fontdesc)
+ pango_layout_set_font_description(layout, m_fontdesc);
+ else
+ pango_layout_set_font_description(layout, this->GetFont().GetNativeFontInfo()->description);
+
pango_layout_set_text(layout, "H", 1 );
int w,h;
pango_layout_get_pixel_size(layout, &w, &h);
wxCHECK_RET( Ok(), wxT("invalid dc") );
m_font = font;
+
+ return;
+
+#if wxUSE_UNICODE
+ m_fontdesc = font.GetNativeFontInfo()->description;
+#endif
}
void wxWindowDC::SetPen( const wxPen &pen )