
Hi,
There was a lengthy discussion about markers at yesterday's SVG teleconference. At least one browser vendor would like to change the behavior of markers in the SVG1.1 spec. At the moment, markers inherit the style of their parent at the point they are defined:
<g fill="black" stroke="red> <marker id="marker1"> <rect width="10" height="10"/> </marker> <path marker-start="url(#marker1)" d="M 30 60 L 80 60 L 80 110 Z"/> <g>
would produce a marker on a path. Both the marker and path would have a black fill and a red stroke. On the other hand:
<g fill="green" stroke="yellow> <marker id="marker2"> <rect width="10" height="10"/> </marker> <g> <g fill="black" stroke="red> <marker id="marker2"> <rect width="10" height="10"/> </marker> <path marker-start="url(#marker2)" d="M 30 60 L 80 60 L 80 110 Z"/> <g>
would produce a marker on a path with the marker having a green fill and yellow stroke. The proposal is to change the behavior so that the marker fill and stroke are defined at the point they are referenced (like the <use> object). This would allow markers to take the color of the path they are attached to. It was claimed that a search of roughly 30,000 SVG's collected from the Web finds only one SVG that relies on the current spec's behavior... namely the SVG from the W3C test suite that specifically tests the behavior. I'm not sure if this is actually true as many Inkscape's markers don't include fill or stroke color. Since they are defined in the <defs> section, the fill defaults to black. If the marker fill were defined at the point of reference, I would think that it would take the object's fill... which is normally "none" for a path with an arrowhead.
I pointed out that this does not solve the typical Inkscape user's problem since what most user's want is for the marker fill to be the same color as the object's stroke color, see:
https://bugs.launchpad.net/inkscape/+bug/165865
The plan is to reevaluate the proper way to handle markers for SVG2 and then look at what changes to 1.1 can be made that will be compatible with SVG2. This could include changing the spec as described above.
Tav
BTW, why do some Inkscape markers include "font-size" in their style?