W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2017

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

From: Myles C. Maxfield via GitHub <sysbot+gh@w3.org>
Date: Sat, 29 Apr 2017 05:26:28 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-225234905-1493443587-sysbot+gh@w3.org>
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:

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

<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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:11 UTC