Re: [csswg-drafts] Images with layout information (#4116)

Here’s another use case in addition to the ones that Myles presented at the start of this discussion:

Sometimes I’d like to use SVG images to display inline text for one of the following reasons:
– The text is in a script that’s not encoded in Unicode yet.
– The text is in a script that’s been recently encoded in Unicode, but is not properly supported in all the shaping engines used by all browsers yet.
– I need to use fonts that aren’t encoded in Unicode.
– I want the text to be correctly rendered even in reader mode, which strips all font information, relies on fallback fonts which may not exist or may be buggy, and exposes browser bugs related to cluster breaks.

To make this look good, the baseline of the text in the SVG image needs to line up with the baseline of the surrounding text.

For my purposes, it would be sufficient if I could specify the baseline of the SVG image using a single attribute on the `svg` element with the x or y coordinate of the baseline within the image’s view box. The orientation of the baseline would matter, but the type wouldn’t because I’d produce the SVG images for a specific HTML document and could coordinate the use of baselines between the two. However, the more descriptive attributes proposed by Myles in w3c/svgwg#739 would also work.

I’d much prefer specifying an image’s baseline in the SVG image itself rather than using a CSS property, as the baselines may differ between images.

-- 
GitHub Notification of comment by NorbertLindenberg
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4116#issuecomment-579025143 using your GitHub account

Received on Tuesday, 28 January 2020 00:40:03 UTC