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

Re: [csswg-drafts] [css-fonts-4] [varfont] access to named instances

From: Jason Pamental via GitHub <sysbot+gh@w3.org>
Date: Sat, 14 Oct 2017 10:40:28 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-336626541-1507977612-sysbot+gh@w3.org>
I outlined this in #1289 but am copying this over here as an example for how we might be able to do this in CSS:

```
@font-face {
        font-family: Hamstervar;
        src: url("Hamstervar-VF.ttf");
        font-stretch: normal;
        font-weight: normal,
        font-variation-settings: "wdth" 85, "wght" 327; 
}

@font-face {
        font-family: Hamstervar;
        src: url("Hamstervar-VF.ttf");
        font-weight: bold,
        font-variation-settings: "wght" 572; 
}

@font-face {
        font-family: Hamstervar;
        src: url("Hamstervar-VF.ttf");
        font-stretch: expanded;
        font-weight: bold,
        font-variation-settings: "wdth" 112, "wght" 572; 
}

```

In this way we tell the browser _how to apply_ the keywords, in this way using `font-variation-settings` to effectively map the values we want to the keywords expected.

-- 
GitHub Notification of comment by jpamental
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/525#issuecomment-336626541 using your GitHub account
Received on Saturday, 14 October 2017 10:40:15 UTC

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