Skip to content

Instantly share code, notes, and snippets.

@DanElliottPalmer
Last active August 19, 2016 16:14
Show Gist options
  • Save DanElliottPalmer/6c85e2b3f9b82ee3aef3ccbc49f44b2d to your computer and use it in GitHub Desktop.
Save DanElliottPalmer/6c85e2b3f9b82ee3aef3ccbc49f44b2d to your computer and use it in GitHub Desktop.
/**
* I need to set a fallback font for a web font. However that fallback font
* needs to be a web font
*/
@font-face {
font-family: "FallbackFont";
font-weight: bold;
src: url('some-place.woff');
}
@font-face {
font-family: "MainFont";
font-weight: normal;
src: url('some-other-place.woff');
}
/**
* For the MainFont, I need to set the fallbackfont as the font I want to
* use for a specific weight.
*/
@font-face {
font-family: "MainFont";
font-weight: bold;
src: "FallbackFont";
}
/**
* I can do this with local fonts
*/
@font-face {
font-family: 'Butts';
font-style: normal;
font-weight: normal;
src: local('Arial')
}
@font-face {
font-family: 'Butts';
font-style: normal;
font-weight: bold;
src: local('Comic sans ms')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment