Use correct decoration for fallback font engines
The font engine itself specifies the line thickness, underline position etc. so we need to pass in the correct one, not the multi engine (which will just return whatever engine #0 prefers.) Change-Id: I2b2b92e7881df8a8310aedbc6efa304c3210c095 Task-number: QTBUG-33708 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
parent
d35d847be3
commit
ddef89b323
@ -6473,6 +6473,8 @@ void QPainterPrivate::drawTextItem(const QPointF &p, const QTextItem &_ti, QText
|
||||
extended->drawTextItem(QPointF(x, y), ti2);
|
||||
else
|
||||
engine->drawTextItem(QPointF(x, y), ti2);
|
||||
drawTextItemDecoration(q, p, ti2.fontEngine, textEngine, ti2.underlineStyle,
|
||||
ti2.flags, ti2.width.toReal(), ti2.charFormat);
|
||||
|
||||
if (!rtl)
|
||||
x += ti2.width.toReal();
|
||||
@ -6504,6 +6506,8 @@ void QPainterPrivate::drawTextItem(const QPointF &p, const QTextItem &_ti, QText
|
||||
extended->drawTextItem(QPointF(x, y), ti2);
|
||||
else
|
||||
engine->drawTextItem(QPointF(x,y), ti2);
|
||||
drawTextItemDecoration(q, p, ti2.fontEngine, textEngine, ti2.underlineStyle,
|
||||
ti2.flags, ti2.width.toReal(), ti2.charFormat);
|
||||
|
||||
// reset the high byte for all glyphs
|
||||
const int hi = which << 24;
|
||||
@ -6515,9 +6519,9 @@ void QPainterPrivate::drawTextItem(const QPointF &p, const QTextItem &_ti, QText
|
||||
extended->drawTextItem(p, ti);
|
||||
else
|
||||
engine->drawTextItem(p, ti);
|
||||
drawTextItemDecoration(q, p, ti.fontEngine, textEngine, ti.underlineStyle,
|
||||
ti.flags, ti.width.toReal(), ti.charFormat);
|
||||
}
|
||||
drawTextItemDecoration(q, p, ti.fontEngine, textEngine, ti.underlineStyle,
|
||||
ti.flags, ti.width.toReal(), ti.charFormat);
|
||||
|
||||
if (state->renderHints != oldRenderHints) {
|
||||
state->renderHints = oldRenderHints;
|
||||
|
Loading…
Reference in New Issue
Block a user