- From: Doug Schepers <schepers@w3.org>
- Date: Thu, 18 Jul 2013 11:41:34 -0400
- To: David Dailey <ddailey@zoominternet.net>
- CC: www-svg@w3.org
Hi, David- Firefox is correct [1]: [[ comma-wsp: (wsp+ comma? wsp*) | (comma wsp*) wsp: (#x20 | #x9 | #xD | #xA) curveto: ( "C" | "c" ) wsp* curveto-argument-sequence curveto-argument-sequence: curveto-argument | curveto-argument comma-wsp? curveto-argument-sequence curveto-argument: coordinate-pair comma-wsp? coordinate-pair comma-wsp? coordinate-pair ]] That said, I think the behavior of the other browsers is less strict and probably preferable... in this case, the delimiter should be any combination of spaces and at most one optional comma. As a follow-up, would you expect this to work? d="… 300 400 C, 300 600 … " [1] http://www.w3.org/TR/SVG2/paths.html#PathDataBNF Regards- -Doug On 7/18/13 11:16 AM, David Dailey wrote: > In the example at http://cs.sru.edu/~ddailey/svg/alphabetcomma.svg all > browsers (real and hypothetical) except for Firefox render all four > shapes the same way. Firefox, (no doubt detecting that I am trying to > draw glyphs in SVG -- a real non-non in FF-land as I understand it) on > the other hand, is unhappy with the extra commas in my path’s d attribute: > > d="… 300 400, C 300 600, … " > > I know I shouldn’t have put the commas there and my wrists are stinging > already, so I offer a solution at > http://cs.sru.edu/~ddailey/svg/alphabet.svg that removes the extra > commas before the path subcommands > > I seem to recall running into this once before (I often like to separate > my coordinate pairs from one another by commas, and then for fun, I > begin moving them about and forget to tidy up all the loose ends, but > heck it works in all browsers save one!). And consistent with that > recollection, I remember the good folks at Mozilla explaining that it > was the other browsers that did it wrong – they merely followed the > spec. Well, should this be the case, then I think the spec is at fault. > > Apologies if this is just a bug in FF, but usually they are quite > fastidious in their reading of the spec! > > Cheers > > David >
Received on Thursday, 18 July 2013 15:41:36 UTC