Re: [csswg-drafts] [css-values] Proposal: `sp` and `rsp` space glyph units (#10534)

Regarding

> While adding space glyph advance measure unit could be helpful, does this open the door to requests for units for other glyphs? If so, should an additional function to return the advance measure of any glyph be explored? 

I'd be pretty hesitant to start down this road. We'd have to either decide what fallback value to use if the requested character isn't supported by the first available font (and if we're using fallbacks, the point of measuring specific characters may be largely defeated), or else deal with the issue that every character might resolve to a different font resource, depending on character coverage/unicode-range usage. Yes, the browser already has to deal with this when rendering text, but I don't think all that complexity should be pushed down into the definition of a CSS unit.

(We already have to deal with this for two specific characters to support the `ch` and `ic` units, which are defined in terms of "the font used to render it" rather than "the first available font". But let's not open this up to the entire Unicode space of a million codepoints just to resolve CSS units. If a page *really* wants to measure arbitrary characters, there are ways it can do so through JS.)

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


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

Received on Monday, 8 July 2024 09:01:04 UTC