[csswg-drafts] [css-fonts-4] [varfont] Consider not clamping single values in `@font-face` descriptors

litherum has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-fonts-4] [varfont] Consider not clamping single values in `@font-face` descriptors ==
Currently, `@font-face` blocks are used like:

```css
@font-face {
    font-family: "MyCoolFont";
    font-weight: 700;
    src: url("MyCoolFont.ttf") format("truetype");
}
```

```html
<div style="font-family: 'MyCoolFont'; font-weight: 800;">
```

Let's pretend this web author then replaces their font file with a variable font which support weight ranges 600 - 900. In this situation, the page wouldn't look different, because the `font-weight` descriptor will clamp the request to the range [700, 700], so the value applied would be 700, which is the same as what the original file would have rendered.

However, the request was for weight 800, and the font supports weight 800. Perhaps we should consider `font-weight: 700` distinctly from `font-weight: 700 700` in the `@font-face` block. This would mean that web authors would have to opt-in to the clamping behavior by setting an explicit range.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1306 using your GitHub account

Received on Saturday, 29 April 2017 05:26:35 UTC