summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainter.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-18 14:47:35 +0200
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-19 02:55:29 +0200
commitca36198251147d2df0b07beef1f824e07e369d07 (patch)
tree2e93a5c35b4e9b8d71f441e203fe840000ad818f /src/gui/painting/qpainter.cpp
parent4453bfcb20a781192870b37f668ebee72b91974e (diff)
QPaintBuffer paints drawGlyphRun with wrong font
If QRawFont and and drawGlyphRun is used on a QPaintBuffer it will lose the QRawFont and end up painting with primary font at the time. With this patch, QStaticTextItem can now indicate that they must be drawn using the supplied font-engine and that the font information is not enough. Change-Id: Id6bd376d797d2bfb457e7de55c48bdcf9f20ae38 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r--src/gui/painting/qpainter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 159acf40c6..3af8fdea2e 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -5619,6 +5619,8 @@ void QPainterPrivate::drawGlyphs(const quint32 *glyphArray, QFixedPoint *positio
staticTextItem.numGlyphs = glyphCount;
staticTextItem.glyphs = reinterpret_cast<glyph_t *>(const_cast<glyph_t *>(glyphArray));
staticTextItem.glyphPositions = positions;
+ // The font property is meaningless, the fontengine must be used directly:
+ staticTextItem.usesRawFont = true;
extended->drawStaticTextItem(&staticTextItem);
} else {