's' command causes problems with some renderers; 'C' becomes 's' even if it describes a straight line

Bug #603987 reported by Louis Simard
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scour
Fix Released
Low
Patrick Storz

Bug Description

The file fulltests/cgmail.svg, originally from Ubuntu 10.04's /usr/share/app-install/icons/cgmail.svg and added to trunk revision 181, renders incorrectly after being Scoured.

-- To reproduce --

Program version: trunk revision 180

Command line: ./scour.py --shorten-ids --enable-id-stripping --create-groups --renderer-workaround --indent=none -i fulltests/cgmail.svg -o fulltests/cgmail.opt.svg

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Changed in scour:
importance: Undecided → High
Revision history for this message
codedread (codedread) wrote :

1) The uploaded SVG does not seem to have the problem indicated in the PNG when looking at it with Firefox or Chrome.

2) I do not have a --create-groups option. You seem to be using a development version or private branch of scour?

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

1) True. The render was made with rsvg, and the bug does not appear in Firefox or Chrome. This will have to go into --renderer-workaround and be filed as a bug against librsvg perhaps.

2) It's in the trunk. Update your trunk directory to at least revision 180.

Revision history for this message
codedread (codedread) wrote : Re: [Bug 603987] Re: Bad render: fulltests/cgmail.png

$ bzr up
Tree is up to date at revision 176 of branch
/Users/jeffschiller/Documents/scour

hmmm

On Sat, Jul 10, 2010 at 9:00 AM, Cynthia Gauthier <<email address hidden>
> wrote:

> 1) True. The render was made with rsvg, and the bug does not appear in
> Firefox or Chrome. This will have to go into --renderer-workaround and
> be filed as a bug against librsvg perhaps.
>
> 2) It's in the trunk. Update your trunk directory to at least revision
> 180.
>
> --
> Bad render: fulltests/cgmail.png
> https://bugs.launchpad.net/bugs/603987
> You received this bug notification because you are a member of Scouring
> Pads, which is the registrant for Scour.
>
> Status in Scour - Cleaning SVG Files: New
>
> Bug description:
> The file fulltests/cgmail.svg, originally from Ubuntu 10.04's
> /usr/share/app-install/icons/cgmail.svg and added to trunk revision 181,
> renders incorrectly after being Scoured.
>
> -- To reproduce --
>
> Program version: trunk revision 180
>
> Command line: ./scour.py --shorten-ids --enable-id-stripping
> --create-groups --renderer-workaround --indent=none -i fulltests/cgmail.svg
> -o fulltests/cgmail.opt.svg
>
>
>

Revision history for this message
codedread (codedread) wrote :

Ah, just did 'bzr pull' and that brought me up to date, thanks.

Jeff

On Sat, Jul 10, 2010 at 9:09 AM, Jeff Schiller <email address hidden> wrote:

> $ bzr up
> Tree is up to date at revision 176 of branch
> /Users/jeffschiller/Documents/scour
>
> hmmm
>
> On Sat, Jul 10, 2010 at 9:00 AM, Cynthia Gauthier <
> <email address hidden>> wrote:
>
>> 1) True. The render was made with rsvg, and the bug does not appear in
>> Firefox or Chrome. This will have to go into --renderer-workaround and
>> be filed as a bug against librsvg perhaps.
>>
>> 2) It's in the trunk. Update your trunk directory to at least revision
>> 180.
>>
>> --
>> Bad render: fulltests/cgmail.png
>> https://bugs.launchpad.net/bugs/603987
>> You received this bug notification because you are a member of Scouring
>> Pads, which is the registrant for Scour.
>>
>> Status in Scour - Cleaning SVG Files: New
>>
>> Bug description:
>> The file fulltests/cgmail.svg, originally from Ubuntu 10.04's
>> /usr/share/app-install/icons/cgmail.svg and added to trunk revision 181,
>> renders incorrectly after being Scoured.
>>
>> -- To reproduce --
>>
>> Program version: trunk revision 180
>>
>> Command line: ./scour.py --shorten-ids --enable-id-stripping
>> --create-groups --renderer-workaround --indent=none -i fulltests/cgmail.svg
>> -o fulltests/cgmail.opt.svg
>>
>>
>>
>

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote : Re: Bad render: fulltests/cgmail.png

'bzr pull' :) [or 'bzr pull lp:scour']

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

lack of refresh + trying to track the bug down = my worst enemy

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

The next-to-last element in the original file's <svg> is a <path> element. Its data contain

  L 21.448701,5.4508678 C 21.448701,5.4508678 7.4009628,17.714589 7.4009628,17.714589

, which becomes

  v-8.0991s-14.048 12.264-14.048 12.264

when passed through Scour. There are two things to note here:

1. This CurveTo makes a straight line, but it becomes a smooth Bézier curve instead of a relative LineTo (l).
2. The SmoothCurve command might be mishandled by librsvg when the previous command makes a straight line.

summary: - Bad render: fulltests/cgmail.png
+ 's' command causes problems with some renderers; 'C' becomes 's' even if
+ it describes a straight line
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

Importance downgraded because this bug only really affects a single renderer, and the 's' commands created from straight 'C's are otherwise functionally equivalent.

Changed in scour:
importance: High → Low
status: New → Triaged
Revision history for this message
Patrick Storz (ede123) wrote :

Seems fixed in the meantime, see copy of this bug on GitHub for details
https://github.com/scour-project/scour/issues/75

Changed in scour:
status: Triaged → Fix Released
assignee: nobody → Eduard Braun (eduard-braun2)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.