- From: Lorp via GitHub <sysbot+gh@w3.org>
- Date: Tue, 25 Apr 2017 16:20:52 +0000
- To: public-css-archive@w3.org
Back in October 2015, Jonathan Kew proposed an interesting solution for another case where multiple fonts exist in the same font file – TTC files. https://lists.w3.org/Archives/Public/www-style/2015Oct/0158.html His proposal was a new syntax using "#", the URL fragment identifier. In his example below it allows a fallback TTC font to be used for a regular and bold when the ideal fonts are not available: ~~~~ @font-face { font-family: my-favorite-font; font-weight: 400; src: url(MyFavorite.woff), url(MyFallback.ttc#1); } @font-face { font-family: my-favorite-font; font-weight: 600; src: url(MyFavoriteBold.woff), url(MyFallback.ttc#3); } ~~~~ So we could potentially use similar syntax in selecting variations from within a variable font. Here is my CSS second code block above, rewritten using one potential syntax for variations: ~~~~ @font-face { font-family: Gingham; src: url("Gingham-Variable.ttf#wght=343,wdth=130"); } @font-face { font-family: Gingham; src: url("Gingham-Variable.ttf#wght=844,wdth=130"); font-weight: bold; } ~~~~ Any thoughts? -- GitHub Notification of comment by Lorp Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1289#issuecomment-297084493 using your GitHub account
Received on Tuesday, 25 April 2017 16:20:59 UTC