Windows: Remove font size hack
This hack was reintroduced in a4478b2896
,
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 <lars.knoll@digia.com>
This commit is contained in:
parent
1ad78f5f29
commit
0c2f7388a8
@ -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();
|
||||
#endif
|
||||
|
||||
QVarLengthArray<glyph_t> glyphs;
|
||||
QVarLengthArray<QFixedPoint> positions;
|
||||
QTransform m = QTransform::fromTranslate(p.x(), p.y());
|
||||
|
Loading…
Reference in New Issue
Block a user