diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-09-16 12:11:03 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-09-17 13:47:11 +0200 |
commit | ec847a27ad3a22bc243fb1d4b8196c7ddefff2e6 (patch) | |
tree | c56621d83e70ebba6f0e9fbcc8f6a3f3b2cf02f4 /src | |
parent | 4d1bca0043427db85982c89cea6b608fce46df26 (diff) | |
download | qtsvg-ec847a27ad3a22bc243fb1d4b8196c7ddefff2e6.tar.gz |
Fix drawGlyphRun on a QSvgGenerator
Make QSvgPaintEngine::drawTextItem handle the case where a text-item
has no chars but only glyphs, like it will when using drawGlyphRun.
Task-number: QTBUG-39953
Change-Id: Id912c11f8830a450279943de657546e5cee762f3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/svg/qsvggenerator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp index bc67436..6a12043 100644 --- a/src/svg/qsvggenerator.cpp +++ b/src/svg/qsvggenerator.cpp @@ -1045,6 +1045,8 @@ void QSvgPaintEngine::drawTextItem(const QPointF &pt, const QTextItem &textItem) return; const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem); + if (ti.chars == 0) + QPaintEngine::drawTextItem(pt, ti); // Draw as path QString s = QString::fromRawData(ti.chars, ti.num_chars); *d->stream << "<text " |