From b4306a687ad864b2ef9ee75075f25287b1faae84 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Wed, 29 Dec 2010 14:25:15 +0000 Subject: [PATCH] branch: 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 r37030, and http://bugreports.qt.nokia.com/browse/QTBUG-16331. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@37036 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiFontMetrics.cpp | 4 ++-- status.16x | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiFontMetrics.cpp b/src/frontends/qt4/GuiFontMetrics.cpp index 76ebd90706..7103fb55fc 100644 --- a/src/frontends/qt4/GuiFontMetrics.cpp +++ b/src/frontends/qt4/GuiFontMetrics.cpp @@ -49,13 +49,13 @@ static inline QChar const ucs4_to_qchar(char_type const ucs4) // See comment in QLPainter::text() for more explanation. 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) { } diff --git a/status.16x b/status.16x index a165e248ca..1e9c6cbe8b 100644 --- a/status.16x +++ b/status.16x @@ -81,6 +81,9 @@ What's new - Fix crash when removing a math macro argument while instant preview is active (bug 7090). +- Fix the painting of the workarea for a non-standard DPI and using + emulated scaling on Windows Vista and Windows 7 (bug 7187). + - Fix insertion of a user math macro through the math-insert lfun when a selection is present (bug 6939).