Skip to content

Instantly share code, notes, and snippets.

@tomswatermelon
Last active October 6, 2021 14:28
Show Gist options
  • Save tomswatermelon/3792fc91b94aca5f30fe to your computer and use it in GitHub Desktop.
Save tomswatermelon/3792fc91b94aca5f30fe to your computer and use it in GitHub Desktop.
Webfonts CSS
/*Roboto*/
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
src: local('Roboto Thin'), local('Roboto-Thin'), url(fonts/Roboto-Thin.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(fonts/Roboto-Light.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto Regular'), local('Roboto-Regular'), url(fonts/Roboto-Regular.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(fonts/Roboto-Medium.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(fonts/Roboto-Bold.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
src: local('Roboto Black'), local('Roboto-Black'), url(fonts/Roboto-Black.ttf) format('truetype');
}
/*Roboto Slab*/
@font-face {
font-family: 'Roboto Slab';
font-style: normal;
font-weight: 100;
src: local('Roboto Slab Thin'), local('RobotoSlab-Thin'), url(fonts/RobotoSlab-Thin.ttf) format('woff');
}
@font-face {
font-family: 'Roboto Slab';
font-style: normal;
font-weight: 300;
src: local('Roboto Slab Light'), local('RobotoSlab-Light'), url(fonts/RobotoSlab-Light.ttf) format('woff');
}
@font-face {
font-family: 'Roboto Slab';
font-style: normal;
font-weight: 400;
src: local('Roboto Slab Regular'), local('RobotoSlab-Regular'), url(fonts/RobotoSlab-Regular.ttf) format('woff');
}
@font-face {
font-family: 'Roboto Slab';
font-style: normal;
font-weight: 700;
src: local('Roboto Slab Bold'), local('RobotoSlab-Bold'), url(fonts/RobotoSlab-Bold.ttf) format('woff');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment