"Convert CSS attributes to XML attributes" breaks rendering in external applications
Hi,
I have tried to submit a bug report via launchpad multiple times during the day but it seems to not like me today, thus I am submitting it via the ML.
When I save an optimized .svg with the option "Convert CSS attributes to XML attributes" enabled with Inkscape 0.91 (Ubuntu 16.04), any application that I have tested but Inkscape do not display some parts of an image with the resulting file. I managed to create a MWE that should be handy enough for a successful analysis.
Attached you can find the original Inkscape .svg and two optimized .svg files created with the CSS option turned on and off respectively. When the option is off then all applications render the dot fine, when it is on only Inkscape recognizes it.
KR
The problem is not with "Convert CSS attributes to XML attributes" specifically, but with the "Create groups for similar attributes". The exporter script is inserting a <g> inside a <text>, which is invalid and should not render in a conforming SVG implementation. It's an error that Inkscape renders the nested <tspan>, although not one that would usually be a problem! The exporter script either needs to use another <tspan> for the grouping or just skip grouping within a <text> element altogether.
~ABR
On 25 October 2016 at 13:40, Stefan Tauner <tauner@...3436...> wrote:
Hi,
I have tried to submit a bug report via launchpad multiple times during the day but it seems to not like me today, thus I am submitting it via the ML.
When I save an optimized .svg with the option "Convert CSS attributes to XML attributes" enabled with Inkscape 0.91 (Ubuntu 16.04), any application that I have tested but Inkscape do not display some parts of an image with the resulting file. I managed to create a MWE that should be handy enough for a successful analysis.
Attached you can find the original Inkscape .svg and two optimized .svg files created with the CSS option turned on and off respectively. When the option is off then all applications render the dot fine, when it is on only Inkscape recognizes it.
KR
Dipl.-Ing. Stefan Tauner Research and Development Embedded Systems Department
University of Applied Sciences Technikum Wien Hoechstaedtplatz 6, 1200 Vienna, Austria T: +43 1 333 40 77-316 E: stefan.tauner@...3436... I: embsys.technikum-wien.at I: www.technikum-wien.at
The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
This issue has already been fixed in Scour (Scour is the SVG optimizer that is used in Inkscape when you save as "Optimized SVG") and the fix [1] is included in Scour 0.35.
There are also some major improvements concerning the "Optimized SVG" export via Scour in Inkscape 0.92, most notably:
* Completely redesigned settings dialog. * Starting with version 0.92 Inkscape uses the Scour version installed on the system (e.g. via "pip install scour") instead of a bundled version so you can always profit from the latest improvements. * A *lot* of new features and fixes in the Scour module itself, check out the release notes [2] (Scour 0.26 from 2011-05-09 was the version that has been bundled with Inkscape 0.91).
If you want to give it a try I suggest you install a 0.92 pre-release!
Regards, Eduard
P.S. As I'm the one who implemented the fixes in Inkscape and became a maintainer of the Scour module recently feel free to let me know if you have any issues or suggestions. Requests regarding the Scour module itself (i.e. not specific to the implementation in Inkscape) are best submitted directly to the projects issue tracker on GitHub [3].
[1] https://github.com/scour-project/scour/commit/584407625853e75efb679572a01990... [2] https://github.com/scour-project/scour/blob/master/HISTORY.md [3] https://github.com/scour-project/scour
Am 25.10.2016 um 22:20 schrieb Amelia Bellamy-Royds:
The problem is not with "Convert CSS attributes to XML attributes" specifically, but with the "Create groups for similar attributes". The exporter script is inserting a <g> inside a <text>, which is invalid and should not render in a conforming SVG implementation. It's an error that Inkscape renders the nested <tspan>, although not one that would usually be a problem! The exporter script either needs to use another <tspan> for the grouping or just skip grouping within a <text> element altogether.
~ABR
On 25 October 2016 at 13:40, Stefan Tauner <tauner@...3436... mailto:tauner@...3436...> wrote:
Hi, I have tried to submit a bug report via launchpad multiple times during the day but it seems to not like me today, thus I am submitting it via the ML. When I save an optimized .svg with the option "Convert CSS attributes to XML attributes" enabled with Inkscape 0.91 (Ubuntu 16.04), any application that I have tested but Inkscape do not display some parts of an image with the resulting file. I managed to create a MWE that should be handy enough for a successful analysis. Attached you can find the original Inkscape .svg and two optimized .svg files created with the CSS option turned on and off respectively. When the option is off then all applications render the dot fine, when it is on only Inkscape recognizes it. KR -- Dipl.-Ing. Stefan Tauner Research and Development Embedded Systems Department University of Applied Sciences Technikum Wien Hoechstaedtplatz 6, 1200 Vienna, Austria T: +43 1 333 40 77-316 <tel:%2B43%201%20333%2040%2077-316> E: stefan.tauner@...3436... <mailto:stefan.tauner@...3436...> I: embsys.technikum-wien.at <http://embsys.technikum-wien.at> I: www.technikum-wien.at <http://www.technikum-wien.at> ------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET <http://ASP.NET> CLI. Get your free copy! http://sdm.link/telerik _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net <mailto:Inkscape-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/inkscape-devel <https://lists.sourceforge.net/lists/listinfo/inkscape-devel>
The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Tue, 25 Oct 2016 23:46:12 +0200 Eduard Braun <Eduard.Braun2@...173...> wrote:
[lots of stuff]
Hi,
thanks for all that information - I was not aware of any of this. Just not ticking the box works fine enough for me though, so please don't expect any further comments from me ;)
Happy developing and KR!
participants (3)
-
Amelia Bellamy-Royds
-
Eduard Braun
-
Stefan Tauner