#include "wx/log.h"
#include "wx/dcmemory.h"
#include "wx/math.h" // for floating-point functions
+ #include "wx/image.h"
#endif
-#include "wx/image.h"
#include "wx/module.h"
#include "wx/fontutil.h"
wxCoord wxWindowDC::GetCharHeight() const
{
- pango_layout_set_text( m_layout, "H", 1 );
- int h;
- pango_layout_get_pixel_size( m_layout, NULL, &h );
- return h;
+ PangoFontMetrics *metrics = pango_context_get_metrics (m_context, m_fontdesc, NULL);
+ return PANGO_PIXELS (pango_font_metrics_get_descent (metrics) + pango_font_metrics_get_ascent (metrics));
}
void wxWindowDC::Clear()