When saving as SVG 1.1, file is not SVG 1.1 compliant
Summary:
When saving a file as SVG 1.1 (using the Export as SVG 1.1 per settings in Preferences dialog checkbox), the resulting file is not SVG 1.1 compliant. In particular, arrows contain the style property style="stroke:context-stroke", which is an SVG 2 property (see here for the relevant part of the SVG 2 draft specification, which includes the context-stroke paint value, and here for the relevant part of the SVG 1.1 specification, which does not include the context-stroke paint value). This causes the SVG to be rendered incorrectly without arrows present in an SVG 1.1 renderer (e.g. any internet browser currently available).
Steps to reproduce:
- open Inkscape
- draw a Bezier curve with an arrow on one end (see attached file below to save some work)
- go to
File->Save a copyor press Shift+Ctrl+Alt+S - select
Plain SVGas export filetype - make sure to enable the
Export as SVG 1.1 per settings in Preferences dialogcheckbox - select a location, filename, and click
Save - open the resulting file in a web browser and a text editor
What happened?
When the file is displayed in the web browser, no arrow is shown. When the file is opened in a text editor, it can be seen that the <path>'s style attribute contains the stroke:context-stroke style value.
What should have happened?
When the file is displayed in the web browser, the arrow should be shown. When the file is opened in a text editor, no stroke:context-stroke style value should be present anywhere in the file.
Attachments
This is the Inkscape SVG file containing nothing but a line with an arrow on one end: drawing.svg
This is the supposedly SVG 1.1 compliant file produced by Inkscape: drawing-plain.svg
Version info
Inkscape 1.2.1 (9c6d41e, 2022-07-14)
GLib version: 2.64.6
GTK version: 3.24.20
glibmm version: 2.64.2
gtkmm version: 3.24.2
libxml2 version: 2.9.10
libxslt version: 1.1.34
Cairo version: 1.17.6
Pango version: 1.44.7
HarfBuzz version: 2.6.4
OS version: Manjaro Linux