particular font, and it doesn't go through all the layoutting code (hence, 20-35% quicker than measuring H for
logical extents).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40049
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxCoord wxWindowDC::GetCharHeight() 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()
}
void wxWindowDC::Clear()