summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainter.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2016-02-29 09:51:27 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2016-03-01 12:14:51 +0000
commitddef89b323e8507ea5f451cb53ed151e29a110b3 (patch)
tree0ad1e460d6daf3cee95d57fedac60cd88a898394 /src/gui/painting/qpainter.cpp
parentd35d847be32636de642211665b71be5adffe9859 (diff)
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>
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r--src/gui/painting/qpainter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index a7de118688..e70079915a 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -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;