Author: vfr Date: Wed Dec 29 06:35:03 2010 New Revision: 37030 URL: http://www.lyx.org/trac/changeset/37030
Log: Fix bug #7187: Font painting problems with emulated scaling. When creating the QFontMetrics object, we should specify a QPaintDevice. 0 is a paint device which is screen-compatible or pixmap-compatible. This makes sure that the correct DPI is used in font metrics calculations. see also: http://bugreports.qt.nokia.com/browse/QTBUG-16331. Modified: lyx-devel/trunk/src/frontends/qt4/GuiFontMetrics.cpp Modified: lyx-devel/trunk/src/frontends/qt4/GuiFontMetrics.cpp ============================================================================== --- lyx-devel/trunk/src/frontends/qt4/GuiFontMetrics.cpp Wed Dec 29 03:00:27 2010 (r37029) +++ lyx-devel/trunk/src/frontends/qt4/GuiFontMetrics.cpp Wed Dec 29 06:35:03 2010 (r37030) @@ -50,13 +50,13 @@ GuiFontMetrics::GuiFontMetrics(QFont const & font) -: metrics_(font), smallcaps_metrics_(font), smallcaps_shape_(false) +: metrics_(font, 0), smallcaps_metrics_(font), smallcaps_shape_(false) { } GuiFontMetrics::GuiFontMetrics(QFont const & font, QFont const & smallcaps_font) -: metrics_(font), smallcaps_metrics_(smallcaps_font), smallcaps_shape_(true) +: metrics_(font, 0), smallcaps_metrics_(smallcaps_font), smallcaps_shape_(true) { }
