Package: librsvg2-bin Version: 2.40.0-1 Severity: normal Dear Maintainer,
Consider the two SVGs encosed, and the diff between them.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" stroke="#3c790a"> <circle cx="50" cy="50" r="45" stroke-width="10" fill="#fff"/> <path stroke-width="1.5" fill="none" d="M17,66C21,63,43,76,37,68"/> <path stroke="#793c0a" stroke-width="1.5" fill="none" d="M33,75a8,8,0,0,16,8"/> <path stroke-width="1.5" fill="none" d="M50,84C68,49,57,90,63,77,66,58,75,87,71,69,68,62,74,65,78,66"/> <path stroke-width="1.5" fill="none" d="M65,62C57,64,64,71,67,64"/> <path stroke-width="1.5" fill="none" d="M47,60L43,69,44,69,51,66"/> <path stroke-width="1.5" fill="none" d="M50,52C47,60,53,54,52,60,50,68,62,60,57,62,58,54,65,60,59,54,48,42,20,25,29,37"/> <path stroke-width="1.5" fill="none" d="M29,40C23,50,27,47,29,48"/> <path stroke-width="1.5" fill="none" d="M33,37C28,42,37,38,35,42,34,44,30,38,32,48,31,50,36,52,28,50"/> <path stroke-width="1.5" fill="none" d="M32,53L28,52"/> <path stroke-width="1.5" fill="none" d="M30,53C28,55,25,57,30,61,32,62,32,65,38,62,40,61,43,63,44,57,44,56,48,52,44,48L45,45,41,42,40,43,41,47,39,50,35,51"/> <path stroke-width="1.5" fill="none" d="M32,31C43,30,50,16,64,23"/> <path stroke-width="1.5" fill="none" d="M43,37C54,28,49,56,69,48,82,40,78,21,68,20L68,26C72,29,72,29,72,33"/> </svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" stroke="#3c790a"> <circle cx="50" cy="50" r="45" stroke-width="10" fill="#fff"/> <path stroke-width="1.5" fill="none" d="M17,66C21,63,43,76,37,68"/> <path stroke="#793c0a" stroke-width="1.5" fill="none" d="M33,75a8,8,0,0,1,6,8"/> <path stroke-width="1.5" fill="none" d="M50,84C68,49,57,90,63,77,66,58,75,87,71,69,68,62,74,65,78,66"/> <path stroke-width="1.5" fill="none" d="M65,62C57,64,64,71,67,64"/> <path stroke-width="1.5" fill="none" d="M47,60L43,69,44,69,51,66"/> <path stroke-width="1.5" fill="none" d="M50,52C47,60,53,54,52,60,50,68,62,60,57,62,58,54,65,60,59,54,48,42,20,25,29,37"/> <path stroke-width="1.5" fill="none" d="M29,40C23,50,27,47,29,48"/> <path stroke-width="1.5" fill="none" d="M33,37C28,42,37,38,35,42,34,44,30,38,32,48,31,50,36,52,28,50"/> <path stroke-width="1.5" fill="none" d="M32,53L28,52"/> <path stroke-width="1.5" fill="none" d="M30,53C28,55,25,57,30,61,32,62,32,65,38,62,40,61,43,63,44,57,44,56,48,52,44,48L45,45,41,42,40,43,41,47,39,50,35,51"/> <path stroke-width="1.5" fill="none" d="M32,31C43,30,50,16,64,23"/> <path stroke-width="1.5" fill="none" d="M43,37C54,28,49,56,69,48,82,40,78,21,68,20L68,26C72,29,72,29,72,33"/> </svg>
--- path-flag-misparsed.svg 2014-03-04 13:41:10.000000000 -0500 +++ path-flag-intended.svg 2014-03-04 13:40:51.000000000 -0500 @@ -3,3 +3,3 @@ <path stroke-width="1.5" fill="none" d="M17,66C21,63,43,76,37,68"/> -<path stroke="#793c0a" stroke-width="1.5" fill="none" d="M33,75a8,8,0,0,16,8"/> +<path stroke="#793c0a" stroke-width="1.5" fill="none" d="M33,75a8,8,0,0,1,6,8"/> <path stroke-width="1.5" fill="none" d="M50,84C68,49,57,90,63,77,66,58,75,87,71,69,68,62,74,65,78,66"/>
The only difference between them is a single comma in an "a" command. This comma is supposed to be optional. In <http://www.w3.org/TR/SVG/paths.html#PathDataBNF>, the most relevant productions are: ,---- | elliptical-arc: | ( "A" | "a" ) wsp* elliptical-arc-argument-sequence | elliptical-arc-argument-sequence: | elliptical-arc-argument | | elliptical-arc-argument comma-wsp? elliptical-arc-argument-sequence | elliptical-arc-argument: | nonnegative-number comma-wsp? nonnegative-number comma-wsp? | number comma-wsp flag comma-wsp? flag comma-wsp? coordinate-pair | flag: | "0" | "1" | comma-wsp: | (wsp+ comma? wsp*) | (comma wsp*) `---- We end up trying to parse "0,16,8" as "flag comma-wsp? flag comma-wsp? coordinate-pair". This is supposed result in a flag of "0", another of "1", and a coordinate-pair of "6,8". No comma is needed between the "1" and the "6", because a flag cannot be more than one digit long anyway. Firefox and Chrom{e,ium} do fine with this. Unfortunately, rsvg-convert does not actually do this; I'm not sure exactly what it *does* do, but it's the difference between the former and the latter of the enclosed PNGs.
<<inline: rsvg-bad.png>>
<<inline: rsvg-good.png>>
-- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 3.9-1-686-pae (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages librsvg2-bin depends on: ii libc6 2.17-97 ii libcairo2 1.12.16-2 ii libglib2.0-0 2.36.4-1 ii libgtk-3-0 3.8.6-1 ii librsvg2-2 2.40.0-1 librsvg2-bin recommends no packages. librsvg2-bin suggests no packages. -- no debconf information -- Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!