Bug 204817

Summary: Centered text is not shown correctly in SVG images
Product: [Applications] konqueror Reporter: Andreas Pietzowski <andreas>
Component: khtmlAssignee: Konqueror Bugs <konqueror-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: maksim, samuel.brack
Priority: NOR    
Version First Reported In: 4.5.4   
Target Milestone: ---   
Platform: Ubuntu   
OS: Unspecified   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Andreas Pietzowski 2009-08-23 01:05:56 UTC
Version:            (using KDE 4.3.0)
Installed from:    Ubuntu Packages

Look at the following SVG in Konqueror and compare it to Firefox which displays it correct:

http://upload.wikimedia.org/wikipedia/de/a/a1/Wahlverfahren_des_deutschen_Bundeskanzlers.svg

It seems like Konqueror starts the text in the boxes where the centered text should aligned at and not the left starting position of the text. But there seem to be more problems when displaying that SVG with KHTML.
Comment 1 Maksim Orlovich 2009-08-23 01:08:06 UTC
Thanks for the SVG testcases...
Comment 2 Maksim Orlovich 2009-08-23 22:32:02 UTC
SVN commit 1014804 by orlovich:

Fixes for SVG text-anchor. Also some search-and-replace to help out fixing 
up the rest of RenderStyle construction for SVG

CCBUG:204817


 M  +48 -33    css/SVGCSSStyleSelector.cpp  
 M  +31 -28    rendering/SVGRootInlineBox.cpp  
 M  +9 -0      rendering/font.cpp  
 M  +2 -0      rendering/font.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1014804
Comment 3 Andreas Pietzowski 2009-08-24 00:04:23 UTC
Maybe it's off topic but why don't you just use Qt's QSvg-API? I have no expereince with it's wuality and maybe it's worse than KSvn. I am just interested in the reason... Thanks :)
Comment 4 Maksim Orlovich 2009-09-19 19:31:34 UTC
SVN commit 1025789 by orlovich:

automatically merged revision 1014804:
Fixes for SVG text-anchor. Also some search-and-replace to help out fixing 
up the rest of RenderStyle construction for SVG

CCBUG:204817

 M  +48 -33    css/SVGCSSStyleSelector.cpp  
 M  +31 -28    rendering/SVGRootInlineBox.cpp  
 M  +9 -0      rendering/font.cpp  
 M  +2 -0      rendering/font.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1025789
Comment 5 Samuel Brack 2010-12-29 13:51:23 UTC
In Konqueror 4.5.4 the alignment seems right, but some text is floating over the margins of the textboxes. So this seems still to be a bug.
Comment 6 Samuel Brack 2010-12-29 16:54:58 UTC
I marked it as a duplicate because the 2 reports handle the same problem - text that's floating over the margins of the textboxes in the svg.

*** This bug has been marked as a duplicate of bug 204612 ***