From 152368158133e94581e4fc15e43b3230292af69c Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 1 Dec 2004 18:44:50 +0000 Subject: [PATCH] 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 --- src/gtk/gnome/gprint.cpp | 4 ++-- src/gtk1/gnome/gprint.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); -- 2.45.2