W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

Re: [csswg-drafts] [css-fonts] Proposal to expose font metrics (#4780)

From: Mike Bremford via GitHub <sysbot+gh@w3.org>
Date: Wed, 03 Jun 2020 07:34:22 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-638016856-1591169660-sysbot+gh@w3.org>
We've already answered this question with other metrics, e.g. capheight, xheight - we use the first available font. I imagine that would apply here too. Clearly that means the values returned for generic fonts like "serif" will be pretty arbitrary, as they are for x-height. But I suspect that's not the use case the OP had in mind.

I like this proposal. Combined with https://github.com/w3c/csswg-drafts/issues/4792, I think it would give authors who are prepared to get their hands dirty with `calc()` the kind of fine grained control they want over text-layout quite quickly. There are lots of proposals to improve inline layout currently in progress, but almost all are going to rely on these metrics being available. So why not expose them?

-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4780#issuecomment-638016856 using your GitHub account
Received on Wednesday, 3 June 2020 07:34:24 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:09 UTC