X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b85229d15bb4a02a2f3058718a1cf5ed99433020..6d7b547184bfdcdf67790755deb0122050b1d728:/src/gtk/dcclient.cpp diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 06b60cd000..e0898d91d0 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -20,9 +20,9 @@ #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" @@ -1762,10 +1762,8 @@ wxCoord wxWindowDC::GetCharWidth() const 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()