fix GetTextExtent with non-null font argument, fixes #13750

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2011-12-11 19:05:24 +00:00
parent 4cf1a9bf4a
commit 565ed8bfd8

View 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);