X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/155ecd4c4221d3bbc7aa93d472d11948f21d21ab..6bdeda4785ad7313926a79d8c900ff8019d54f64:/src/gtk/dcclient.cpp diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 805f66d495..e0898d91d0 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -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()