GNOME Bugzilla – Bug 666477
<tspan> x attribute not supported for explicit character positioning
Last modified: 2017-12-13 17:50:44 UTC
Created attachment 203817 [details] Sample SVG file: X-axis year labels run together, Y-axis labels are mispositioned Downstream Wikipedia bug report: https://bugzilla.wikimedia.org/show_bug.cgi?id=33245 The attached file uses <tspan>'s 'x' attribute to specify explicit positions for each character in text labels on the graph. We use librsvg to rasterize PNG versions of SVGs on Wikipedia; currently deployed version (also tested 2.34.2 locally) doesn't appear to support this attribute and so lays the text out itself at what turn out to be incorrect positions. Looks like the file is using a (possibly obscure) feature to lay out the various characters at very specific locations: http://www.w3.org/TR/SVG/text.html#TSpanElementXAttribute which librsvg apparently doesn't support. Example bit: <tspan x="0 9.1193962 18.238792 27.358189 55.543907 64.663307 73.7827 82.902092 111.10436 120.22376 129.32661 138.446 166.64827 175.76767 184.88707 194.00645 222.19218 231.31158 240.43097 249.55037 277.75262 286.87204 295.99142 305.09427 333.29654 342.41595 351.53534 360.65472 388.85699 397.95984 407.07925 416.19864 444.51675 453.63617 462.75555 471.87497 500.15961 509.27899 518.39838 527.51776 555.70349 564.82288 573.94232 583.06171" y="0" id="tspan48" style="font-size:16.55062866px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Arial;-inkscape-font-specification:ArialMT">19801983198619891992199519982001200420072010</tspan>
duplicate of Bug 525023
Sorry, bug 525023 seems very unclear, all the given subsequent examples are fixed (with the exception of the first, which is also an instance of this here).
This also applies to the text element. The dy / dx attributes are also affected, see bug 517384.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/librsvg/issues/56.