diff options
authorEskil Abrahamsen Blomfeldt <>2014-11-11 10:25:14 +0100
committerJani Heikkinen <>2014-11-11 20:42:46 +0100
commit0c2f7388a89a9d8ae24379cdbee11a9f85304d19 (patch)
parent1ad78f5f29ef00abae4f718265fa4bc0c35b60f9 (diff)
Windows: Remove font size hack
This hack was reintroduced in a4478b28966c5f630ba3d93b97bc91a3cec2fdbe, and hides scaling artifacts in fonts where there is heavy hinting, such as Arial, but introduces new bugs in other fonts, such as Vijaya. The bottom line is that we shouldn't arbitrarily override the pixel size of the font with the character height that we get from GDI. Due to hinting, there will be some artifacts when printing with screen resolution on Windows. The only way to make this look correct is to use high resolution printing, like the documentation says, or perhaps to force design metrics on the text layout. Task-number: QTBUG-40770 Change-Id: Id151eb0ede5f73efb2a401924ce379d4414ca2b1 Reviewed-by: Lars Knoll <>
1 files changed, 0 insertions, 4 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 1da0c6b65f..9082f98205 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -2524,10 +2524,6 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti)
qreal size = ti.fontEngine->fontDef.pixelSize;
-#if defined(Q_OS_WIN)
- size = (ti.fontEngine->ascent() + ti.fontEngine->descent()).toReal();
QVarLengthArray<glyph_t> glyphs;
QVarLengthArray<QFixedPoint> positions;
QTransform m = QTransform::fromTranslate(p.x(), p.y());