From 6e1e26741e682c869c45e4cf8dfe4c79e37b9716 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Tue, 20 Oct 2009 11:52:42 +0200 Subject: 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 --- src/svg/qsvggenerator.cpp | 1 + 1 file changed, 1 insertion(+) 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 << " >" -- cgit v0.12