GNOME Bugzilla – Bug 338160
Contextural styles failing to be read
Last modified: 2017-12-13 17:27:43 UTC
Please describe the problem: contextural styles fail to work when rsvg interprets an svg file. for example path{stroke-fill: #000000; stroke-width: 1px;} #duck g#duck-beak path{stroke-width: 4px;} all paths within the group with the duck-beak ID will given a stroke width of 4px as opposed to the default 1px width specified to all higher in the stylesheet. Steps to reproduce: 1. open the file http://andy.brisgeek.com/files/test-screen.svg (5kb) 2. notice that evil lurks as contextural styles arent respected. Actual results: I freak out in a state of shock. The tears start and soon I'm quivering in foetal position on the floor. Gently rocking back and forth, all the while wispering "They'll fix it .. I filed a report, They'll fix it" Expected results: Id expect to see all paths within the monitor to hahve 75% opacity and there to be a black line around every shape as well. ( yeah its an ugly effect, but it proves the bug ) Does this happen every time? Even if I ask rsvg nicely Other information: You guys rock harder than coal turning to diamonds. I really hope this wont be too hard to fix, after all, someone got filters working and sexy. Thank you. - Andy
Created attachment 63284 [details] svg icon with a stylesheet embed that proves the bug
Closing INVALID, as Batik also rightly chokes on the file (the in2 attribute on feComposite is indeed required). Please reopen if you can produce a valid test case. Thanks. http://www.w3.org/TR/SVG/filters.html#feComposite [dom@fry batik-1.5.1]$ /usr/java/jdk1.5.0/bin/java -jar batik-rasterizer.jar /tmp/test-screen.svg About to transcode 1 SVG file(s) Converting test-screen.svg to /tmp/test-screen.png ... org.apache.batik.transcoder.TranscoderException: null Enclosed Exception: file:/tmp/test-screen.svg:-1 The attribute "in2" of the element <feComposite> is required at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown Source) at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source) at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source) at org.apache.batik.apps.rasterizer.Main.main(Unknown Source) ... error (SVGConverter.error.while.rasterizing.file)
Created attachment 77180 [details] removed irrelevant filter
Fixed test case by removing the irrelevant filter element. sorry
Created attachment 77181 [details] removed broken NS
Replaced test case with valid SVG. Sorry. 2pixel wide black outlines should be shown around all shapes within the screen. The fill opacity of each shape should also be affected. #computer-monitor path{stroke: #000; stroke-width: 2px; fill-opacity: 0.55;}
-- 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/6.