librsvg bugs
Wikimedia Commons currently uses librsvg 2.54.7[1] for rendering images. It's a fast renderer (compared to Inkscape or Apache Batik), but its results are unreliable, expecially in older Versions ≤2.40.21 . There is a discussion about re-evaluating the SVG renderer on phab:T40010.
Some files may be fixed now. If there are any files that were uploaded earlier and have an error in displaying, you can try purging the file to force a re-render. You should check all the resolutions, since the bugs can show up differently in different resolutions.
If you see a buggy image, tag it with {{Rsvg bug}}. This puts it in Category:Pictures showing a librsvg bug. Some more bugs are reported at Commons:Commons SVG Checker#Checks.
librsvg-Version | Debian | Usage on Wikimedia | ||
---|---|---|---|---|
number | Release date[2] | Version | begin | end |
2.3.93[3] | – | 2006[4] | ||
2.14.0[4] | 2006[4] | at least 2007[5] | ||
2.40.16[6] | 2016-06 | 2016[6] | 2017[7] | |
2.40.18[7] | 2017-07 | 2017[7] | 2019[8] | |
2.40.20-3[9] | 2017-12 | 2019[8] | 2020[10] | |
2.40.21[11] | 2020-02 | 2020[10] | 2023-05-16[12] | |
2.44.10[12] | 2018-12 | Buster[13] | 2023-05-16[12] | 2024-06-06[14] |
2.50.3 | 2021-01[15] | Bullseye[16] | 2024-06-06[14] | 2024-07[1] |
2.54.7 | 2023-07[17] | Bookworm[18] | 2024-07[1] | |
2.59.0 | 2024-09[19] | Trixie[20] |
Rendering of text
[edit]-
Text-positioning.svg Multiple x-/y-/dx-/dy-coordinates positioning text characters Bugzilla:33245
-
Text-positioning fixed.svg Correct positioning (solution to achieve the fix is in the image description)
Hairline cracks
[edit]phab:T20936: This bug appears also in modern browsers on zooming levels.
An workaround can be the using of merge path.
Pattern
[edit]phab:T20463: The libRSVG's handling of SVG pattern is only rudimentary. Some fixed examples (bug in file history):
-
Only on small thumbnail size
Marker
[edit]The presentation of markers is in different viewers implemented differently. The origin point varies. Inkscape shows the boundaries incorrectly.
-
Wiki commons
-
Opera
-
Inkscape
Code of 3) use the translate attribute.
<circle id="circle3" transform="translate(20, 20)" stroke="rgb(0%, 70%, 0%)" cx="0" cy="0" r="20"/>
<marker id="marker3" refX="20" refY="20" viewBox="0 0 40 40"
markerUnits="userSpaceOnUse" markerWidth="40" markerHeight="40">
<use xlink:href="#circle3"/>
</marker>
<line x1="130" x2="270" y1="180" y2="180" marker-start="url(#marker3)" marker-end="url(#marker3)"/>
</svg>
Note that orient="auto-start-reverse" is not implemented in SVG 1.1.
List of outstanding SVG bugs
[edit]Incomplete (please add missing ones e.g. from https://phabricator.wikimedia.org/tag/wikimedia-svg-rendering/)
Can be solved using svgworkaroundbot.toolforge.org
[edit]Solution not yet determined
[edit]References
[edit]- ↑ a b c phab:T381674#10389812
- ↑ https://gitlab.gnome.org/GNOME/librsvg/-/tags?page=5&sort=updated_desc
- ↑ User:Brion Vibber (WMF) on phab:T6976#94122
- ↑ a b c User:Brion Vibber (WMF) on phab:T6976#94135
- ↑ phab:T12207
- ↑ a b User:Kaldari on phab:T65703#2434426
- ↑ a b c mw:User:MMuhlenhoff (WMF) on phab:T170810#3679484
- ↑ a b User:JoKalliauer on phab:T68672#5109579
- ↑ User:EMouzeli (WMF) on phab:T68672#5110846
- ↑ a b User:JoKalliauer on phab:T276684
- ↑ https://gitlab.gnome.org/GNOME/librsvg/-/issues/725#note_1105591
- ↑ a b c phab:T193352
- ↑ https://packages.debian.org/source/buster/librsvg
- ↑ a b phab:T265549#9867973
- ↑ https://github.com/GNOME/librsvg/releases/tag/2.50.3
- ↑ https://packages.debian.org/source/bullseye/librsvg
- ↑ https://github.com/GNOME/librsvg/releases/tag/2.54.7
- ↑ https://packages.debian.org/source/bookworm/librsvg
- ↑ https://github.com/GNOME/librsvg/releases/tag/2.59.0
- ↑ https://packages.debian.org/source/trixie/librsvg