Re: [svgwg] `baseline-y` in SVG (#1075)

Maybe my write-up was unclear. If so, apologies.

> In your specific case the render would actually need to calculate the centroid of the polygon (the average x/y values of all vertices not half of the width and height) – what about other glyphs in the font?  
> In other words: for the desired vertical alignment the renderer would need to switch between glyph based geometry centroids.

No no no! It is the job of the SVG author to ‘know’, to choose, to decide, what should be the baseline. The renderer should do merely the following:

• Is there a `baseline-y` element? If there is, then that is, in viewport space, the baseline. That is a trivial linear calculation, with a division by the height so the only error to trap is <code>height&nbsp;==&nbsp;0</code>.

• If there isn’t a `baseline-y` element, then do as now. 

The browser, the word processor, the typesetting engine, is hard-never to look into the SVG’s paths etc to attempt to identify a mathematical centre, nor an optical centre, nor anything else. Everything needed by typesetting engine is a simple element of the outermost `svg` container: nothing else need be seen.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 21 March 2026 15:12:21 UTC