]> git.saurik.com Git - wxWidgets.git/commitdiff
fix GetTextExtent with non-null font argument, fixes #13750
authorPaul Cornett <paulcor@bullseye.com>
Sun, 11 Dec 2011 19:05:24 +0000 (19:05 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sun, 11 Dec 2011 19:05:24 +0000 (19:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/print.cpp

index 071c5e6733a68565d579bb57d391717d6703ea73..ec14f2c4c9467a13e98c3db58b2bb667da251de0 100644 (file)
@@ -2149,8 +2149,8 @@ void wxGtkPrinterDCImpl::DoGetTextExtent(const wxString& string, wxCoord *width,
     {
         // scale the font and apply it
         PangoFontDescription *desc = theFont->GetNativeFontInfo()->description;
-        float size = pango_font_description_get_size(desc);
-        size = size * GetFontPointSizeAdjustment(72.0);
+        oldSize = pango_font_description_get_size(desc);
+        const float size = oldSize * GetFontPointSizeAdjustment(72.0);
         pango_font_description_set_size(desc, (gint)size);
 
         pango_layout_set_font_description(m_layout, desc);