summaryrefslogtreecommitdiffstats
path: root/src/svg
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-10-20 09:52:42 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-10-20 10:07:26 (GMT)
commit6e1e26741e682c869c45e4cf8dfe4c79e37b9716 (patch)
treebd45abcf2f71dab71e16a42d9378198fdfcb6247 /src/svg
parent23b058cdf3d98439ec784a3d430d54e5aed75c7b (diff)
downloadQt-6e1e26741e682c869c45e4cf8dfe4c79e37b9716.zip
Qt-6e1e26741e682c869c45e4cf8dfe4c79e37b9716.tar.gz
Qt-6e1e26741e682c869c45e4cf8dfe4c79e37b9716.tar.bz2
Fixed the SVG paint engine to preserve whitespace when drawing text.
Added xml:space="preserve" to the output text tag. This attribute tells the SVG user agent not to strip away excess whitespace in the text element. Reviewed-by: Trond
Diffstat (limited to 'src/svg')
-rw-r--r--src/svg/qsvggenerator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp
index da3123f..2f80a92 100644
--- a/src/svg/qsvggenerator.cpp
+++ b/src/svg/qsvggenerator.cpp
@@ -1063,6 +1063,7 @@ void QSvgPaintEngine::drawTextItem(const QPointF &pt, const QTextItem &textItem)
"fill=\"" << d->attributes.stroke << "\" "
"fill-opacity=\"" << d->attributes.strokeOpacity << "\" "
"stroke=\"none\" "
+ "xml:space=\"preserve\" "
"x=\"" << pt.x() << "\" y=\"" << pt.y() << "\" ";
qfontToSvg(textItem.font());
*d->stream << " >"