Skip to content

Instantly share code, notes, and snippets.

@adamsilver
Created March 26, 2016 09:12
Show Gist options
  • Save adamsilver/6e5afb8aeca400606bd5 to your computer and use it in GitHub Desktop.
Save adamsilver/6e5afb8aeca400606bd5 to your computer and use it in GitHub Desktop.
CSS custom font declaration
/**********************************************************
* Droid sans
**********************************************************/
@font-face {
font-family: 'droid sans';
src: url('../fonts/DroidSans-webfont.eot');
src: url('../fonts/DroidSans-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/DroidSans-webfont.woff') format('woff'),
url('../fonts/DroidSans-webfont.ttf') format('truetype'),
url('../fonts/DroidSans-webfont.svg#droid_sansregular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'droid sans';
src: url('../fonts/DroidSans-Bold-webfont.eot');
src: url('../fonts/DroidSans-Bold-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/DroidSans-Bold-webfont.woff') format('woff'),
url('../fonts/DroidSans-Bold-webfont.ttf') format('truetype'),
url('../fonts/DroidSans-Bold-webfont.svg#droid_sansbold') format('svg');
font-weight: bold;
font-style: normal;
}
/**********************************************************
* Droid serif
**********************************************************/
@font-face {
font-family: 'droid serif';
src: url('../fonts/DroidSerif-webfont.eot');
src: url('../fonts/DroidSerif-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/DroidSerif-webfont.woff') format('woff'),
url('../fonts/DroidSerif-webfont.ttf') format('truetype'),
url('../fonts/DroidSerif-webfont.svg#droid_serifregular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'droid serif';
src: url('../fonts/DroidSerif-Bold-webfont.eot');
src: url('../fonts/DroidSerif-Bold-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/DroidSerif-Bold-webfont.woff') format('woff'),
url('../fonts/DroidSerif-Bold-webfont.ttf') format('truetype'),
url('../fonts/DroidSerif-Bold-webfont.svg#droid_serifbold') format('svg');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'droid serif';
src: url('../fonts/DroidSerif-Italic-webfont.eot');
src: url('../fonts/DroidSerif-Italic-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/DroidSerif-Italic-webfont.woff') format('woff'),
url('../fonts/DroidSerif-Italic-webfont.ttf') format('truetype'),
url('../fonts/DroidSerif-Italic-webfont.svg#droid_serifitalic') format('svg');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'droid serif';
src: url('../fonts/DroidSerif-BoldItalic-webfont.eot');
src: url('../fonts/DroidSerif-BoldItalic-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/DroidSerif-BoldItalic-webfont.woff') format('woff'),
url('../fonts/DroidSerif-BoldItalic-webfont.ttf') format('truetype'),
url('../fonts/DroidSerif-BoldItalic-webfont.svg#droid_serifbold_italic') format('svg');
font-weight: bold;
font-style: italic;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment