diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-09-18 14:47:35 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-09-19 02:55:29 +0200 |
commit | ca36198251147d2df0b07beef1f824e07e369d07 (patch) | |
tree | 2e93a5c35b4e9b8d71f441e203fe840000ad818f /src/gui/text | |
parent | 4453bfcb20a781192870b37f668ebee72b91974e (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/text')
-rw-r--r-- | src/gui/text/qstatictext_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h index 4451f27b27..fd920aaa52 100644 --- a/src/gui/text/qstatictext_p.h +++ b/src/gui/text/qstatictext_p.h @@ -79,7 +79,8 @@ class Q_GUI_EXPORT QStaticTextItem { public: QStaticTextItem() : chars(0), numChars(0), useBackendOptimizations(false), - userDataNeedsUpdate(0), m_fontEngine(0), m_userData(0) {} + userDataNeedsUpdate(0), usesRawFont(0), + m_fontEngine(0), m_userData(0) {} QStaticTextItem(const QStaticTextItem &other) { @@ -97,6 +98,7 @@ public: color = other.color; useBackendOptimizations = other.useBackendOptimizations; userDataNeedsUpdate = other.userDataNeedsUpdate; + usesRawFont = other.usesRawFont; m_fontEngine = 0; m_userData = 0; @@ -145,6 +147,7 @@ public: QColor color; // 10 bytes per item char useBackendOptimizations : 1; // 1 byte per item char userDataNeedsUpdate : 1; // + char usesRawFont : 1; // // ================ // 51 bytes per item |