summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-03-27 17:06:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-28 16:18:06 +0100
commitd386c390be7eda670c21f72960b1845bdea11a62 (patch)
tree0a3e4fa73eddc1812f1f10d88db95fe0b55fd9d1
parentc3d07e7d748ecc5fce9fd5938f1b943369f40ca2 (diff)
downloadqtwebkit-d386c390be7eda670c21f72960b1845bdea11a62.tar.gz
[Qt] Monospace font does not render in proper sizes
https://bugs.webkit.org/show_bug.cgi?id=93263 Reviewed by Jocelyn Turcotte. Do not force fonts to use integer metrics. This was necessary when the fast font path only worked in integer but is now hindering accurate metrics. This is also required to make kerning in the fast-path look acceptable Only enabled for Qt 5.1+ to avoid changing all the baselines for 5.0. * platform/graphics/qt/FontPlatformDataQt.cpp: (WebCore::FontPlatformData::FontPlatformData): Change-Id: I565d4cbf2f96fadd5fb6bed0dd0d3e3267a04673 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146203 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r--Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp b/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp
index 529150a7b..78d3c3ce8 100644
--- a/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp
@@ -71,7 +71,10 @@ FontPlatformData::FontPlatformData(const FontDescription& description, const Ato
font.setWeight(toQFontWeight(description.weight()));
font.setWordSpacing(wordSpacing);
font.setLetterSpacing(QFont::AbsoluteSpacing, letterSpacing);
+#if QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
+ // Kept enabled for Qt < 5.1 to maintain stable baselines for 5.0.
font.setStyleStrategy(QFont::ForceIntegerMetrics);
+#endif
m_data->bold = font.bold();
// WebKit allows font size zero but QFont does not. We will return