Re: [svgwg] `text-anchor` not well specified for negative character advance

I think that at least some of the parts you highlighted were added to the spec somewhere between SVG 1.1 1ed and SVG 1.1 2ed. The difference in rendering probably stems from the non-Firefox set of browsers implementing someones interpretation of the SVG 1.1 1ed wording. Firefox had a large overhaul of their SVG text support - I wouldn't be surprised if that even coincided with the spec change... =) (@heycam might know.)
As for how other browsers compute this, I believe it's essentially by computing an extent that is: `sum(advances) + sum(dx adjustments)`, and then shift the initial CTP by a sufficient amount (-extent / 2 for middle for example.) So in this particular example something like (numbers out of thin air where not explicitly provided):
`initial x - extent / 2 => 25 - (advance('m') + [-25] + advance('iddle')) / 2 ~=> 25 - (5 - 25 + 30) / 2 => 20`

-- 
GitHub Notification of comment by fsoder
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/317#issuecomment-301300785 using your GitHub account

Received on Sunday, 14 May 2017 09:28:11 UTC