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

Re: [csswg-drafts] [css-fonts-4] Percentages in font-weight for relative weights (#2690)

From: Myles C. Maxfield via GitHub <sysbot+gh@w3.org>
Date: Mon, 01 Jun 2020 06:29:44 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-636638863-1590992983-sysbot+gh@w3.org>
> I think @LeaVerou (and myself) wants a way to automatically match "stroke" width for a `font-weight` computed value when scaling up and down `font-size`. Based off the a cascade/parents `font-size`?

I'm assuming you don't need to be able to do this across different families (hence my question about the browser having to measure the apparent width of characters in order to find a matching weight in a different font).

Is the idea is to be able to say something like

--multiplier: 0.7;
font-size: calc(100% * var(--multipler));
font-weight: calc(100% / var(--multipler));

... to make the weight scale up in proportion to the font's scale down, so the apparent weight stays the same?

On the face of it, this sounds like a very natural addition to `font-weight`, because this design is already present for `font-size`.

I wonder if this proposal actually would actually allow for images like the one posted [above](https://github.com/w3c/csswg-drafts/issues/2690#issue-325068844). In this example, I would expect the three lines to be sibling elements rather than descendants of each other.

GitHub Notification of comment by litherum
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2690#issuecomment-636638863 using your GitHub account
Received on Monday, 1 June 2020 06:29:48 UTC

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