Skip to content

Instantly share code, notes, and snippets.

@gferreira
Created September 27, 2016 16:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gferreira/44cc3eec6d704f40708c071c047e0b5d to your computer and use it in GitHub Desktop.
/*
Exercise 2B: Flexible typeface family
defining instances directly in CSS
*/
@font-face {
font-family: "MyFamily";
src: url("MyVariableFont-Roman.otf");
font-style: normal;
}
@font-face {
font-family: "MyFamily";
src: url("MyVariableFont-Italic.otf");
font-style: italic;
}
/* document styles */
body { font-family: "MyFamily"; }
h1 { font-variation-settings: 'wght' 900, 'wdth' 80; }
h2 { font-variation-settings: 'wght' 700, 'wdth' 80; }
p { font-variation-settings: 'wght' 400, 'wdth' 100; }
td { font-variation-settings: 'wght' 400, 'wdth' 80; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment