Open BigBadaboom opened 5 years ago
I'm not sure we want non-scaling-stroke
. It's not in SVG 1.1, and so isn't included in the draft right now.
I'm also not sure if any existing SVG Native implementation supports shape-rendering
. If no implementation supports it, that's a fairly strong signal that it isn't necessary (at least for now).
Both of the properties mentioned above are available as presentation attributes in SVG 2, so that alone shouldn't be a deciding factor on whether to include them in SVG Native.
shape-rendering
can be useful for drawing small icons (or font glyphs?) in environments where aliasing is an issue, and is very important for line drawings. Can we be more specific about which graphics libraries do or don't support controlling aliasing on a shape-by-shape level?
vector-effect
is also very useful, but is even more complicated to implement. If the goal of SVG Native is to represent simple vector graphics that scale up & down uniformly (other than resolution adjustments) then it makes sense to disallow it. (Although there are probably other restrictions still required to make that really true.)
shape-rendering
is seen as an optimization hint for user agents. IMO it would not be a harm to add it but IIRC it makes no visual difference on any browser implementation today. So in reality it might not be useful.
Agree with @AmeliaBR on vector-effect
.
it makes no visual difference on any browser implementation today
*Every** major browser implementation does change rendering for shape-rendering: crispEdges
.
* Correction: except EdgeHTML. But that's soon not to be a major browser implementation.
Thanks @AmeliaBR! I probably mixed it up.
shape-rendering
still is a rendering hint. I could imagine that implementations do want to have a consistent appearance. Especially for use cases like fonts or application icons. So unsure if it would actually be implemented at all. However, no objection from my side.
(This issue broken out of #658 per request of @dirkschulze )
The current SVG Static spec has removed CSS and the
style
attribute. However there are some useful properties that don't exist as style attributes.For example:
shape-rendering
Can be used for turning off anti-aliasing on shapes https://codepen.io/PaulLeBeau/pen/PgeWqOvector-effect="non-scaling-stroke"
Quite commonly used for graph and map SVGsThere may be others I haven't thought of.