From: Robert Roebling Date: Wed, 1 Dec 2004 18:44:50 +0000 (+0000) Subject: Applied font scaling patch (GetTextExtent()) to X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/152368158133e94581e4fc15e43b3230292af69c Applied font scaling patch (GetTextExtent()) to new printing code as well. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index 4bdc4076a0..d776d44acd 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -1412,9 +1412,9 @@ void wxGnomePrintDC::DoGetTextExtent(const wxString& string, wxCoord *width, wxC pango_layout_get_pixel_size( m_layout, &w, &h ); if (width) - *width = (wxCoord) w; + *width = (wxCoord)(w / m_scaleX); if (height) - *height = (wxCoord) h; + *height = (wxCoord)(h / m_scaleY); if (descent) { PangoLayoutIter *iter = pango_layout_get_iter(m_layout); diff --git a/src/gtk1/gnome/gprint.cpp b/src/gtk1/gnome/gprint.cpp index 4bdc4076a0..d776d44acd 100644 --- a/src/gtk1/gnome/gprint.cpp +++ b/src/gtk1/gnome/gprint.cpp @@ -1412,9 +1412,9 @@ void wxGnomePrintDC::DoGetTextExtent(const wxString& string, wxCoord *width, wxC pango_layout_get_pixel_size( m_layout, &w, &h ); if (width) - *width = (wxCoord) w; + *width = (wxCoord)(w / m_scaleX); if (height) - *height = (wxCoord) h; + *height = (wxCoord)(h / m_scaleY); if (descent) { PangoLayoutIter *iter = pango_layout_get_iter(m_layout);