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

@jonjohnjohnson
> 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