Skip to content

Instantly share code, notes, and snippets.

@winwu
Created November 30, 2016 08:58
Show Gist options
  • Save winwu/69510d99a084865ec2e8298d61fdb33e to your computer and use it in GitHub Desktop.
Save winwu/69510d99a084865ec2e8298d61fdb33e to your computer and use it in GitHub Desktop.
css font import example
@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/Roboto-Medium.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');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment