Re: SVG 2 high value use cases based on StackOverflow questions

Hi Paul,
thank you for bringing this up, this is good feedback.

A small request from me (to everyone): if you are proposing new features  
for svg2, I'd like to ask that you please first check the list of svg2  
requirements[1] that were collected before starting on svg2.

If the feature has been requested/proposed before, please feel free to  
bring up the topic again, but also include a link to the existing proposal  
 from [1] and the associated issue number if any (since tracker picks it up  
and links to your mail automatically if you include this as text like  
ISSUE-nnnn).

On Thu, 04 Dec 2014 03:37:00 +0100, Paul LeBeau <paul.lebeau@gmail.com>  
wrote:

...
> *viewBox*
>
> ViewBoxes seem to be an endless source of confusion.  Trying to explain  
> how
> to calculate a viewBox can be hard.  I think that supporting  
> viewBox="auto"
> would be very useful to SVG beginners.

This has come up in previous discussions as ISSUE-2378 [2]. I agree that  
this is can be a pain point for new users. Also see the proposal to make a  
view-box property [3], which also included this feature.

On the positive side (in the shorter term), you can find some really nice  
articles written recently on this topic, see [4], and there have been  
others in the past too including pretty much every book on svg in  
existence, one recent example is the SVG Pocket Guide [5].

> *Vertical centering of text*
>
> People are always wanting to center text in circles and rectangles.  At  
> the
> moment there is no reliable way of vertically centering.
>  alignment-baseline support is not universal and depends on the font (?),
> and doesn't support the most common use case.  Usually people want to
> perfectly center the glyph bbox (not the Em box).

We've had requests for exposing more font-metrics, which was deemed to be  
outside the scope of SVG. But vertical centering of text in svg is  
certainly something we could address, and I have seen a number of people  
asking how to do this.

I think needs some more evaluation, if all the baseline properties in SVG  
1.1 were supported, would that be enough to address these use-cases? If  
so, what browsers have bugs blocking the use of this? If there are bugs,  
is the spec clear enough?

> *Responsive sites*
>
> This is a biggie.  Common things people want to do when using SVG in
> responsive websites include:
>
> - Elements whose scale is not affected by preserveAspectRatio
>       - circles that don't squash
>       - clipped images - clip squashes but not the image it is clipping
> - Patterns that whose scale is not affected by preserveAspectRatio
> - Percentage path coordinates
>
> Example:
> http://stackoverflow.com/questions/27070929/certain-parts-of-typography-letters-respond-to-width-height-of-window

Does https://svgwg.org/svg2-draft/painting.html#VectorEffects address the  
non-scaling part sufficiently in your opinion?

Percentages in paths opens up the question of whether we should support  
all units inside the path data syntax. Discussed previously [6][7], and  
also in the context of the Motion path Module [8].

> *Relative positioning*
>
> Another common request is being able to position elements relative to  
> other
> elements.  Not sure how I feel about this, but it comes up quite a lot.
> People are used to the HTML layout model, I guess.

There are some old editor's drafts for this[9][10], but note that these  
have not been published as working drafts, and aren't active atm.


[1]  
https://www.w3.org/Graphics/SVG/WG/wiki/SVG2_Requirements_Mailing_List_Feedback
[2] http://www.w3.org/Graphics/SVG/WG/track/issues/2378
[3] http://lists.w3.org/Archives/Public/www-svg/2013Dec/0080.html
[4] http://sarasoueidan.com/blog/svg-coordinate-systems/
[5] http://svgpocketguide.com/book/
[6] http://lists.w3.org/Archives/Public/www-svg/2013Oct/0003.html
[7] http://www.w3.org/2014/08/26-svg-minutes.html#item10
[8] http://dev.w3.org/fxtf/motion-1/#funcdef-path
[9] http://dev.w3.org/SVG/modules/layout/publish/SVGLayout.html
[10] http://dev.w3.org/SVG/modules/layout/publish/SVGLayoutReqs.html

-- 
Erik Dahlstrom, Web Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group

Received on Thursday, 4 December 2014 09:32:24 UTC