Created
November 27, 2021 18:05
-
-
Save luiznasciment0/57a1be85bf8eb789848b823e146715c7 to your computer and use it in GitHub Desktop.
website to download fonts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url: https://google-webfonts-helper.herokuapp.com/ | |
download the font you want to use, remove the .woff files, leaving only the .woff2 ones. | |
Create a /fonts folder in the /public folder and put the .woff2 files there | |
then, in your global styles, you add this (just an example): | |
@font-face { | |
font-family: 'Roboto'; | |
font-style: normal; | |
font-weight: 400; | |
src: local(''), url('/fonts/roboto-v29-latin-regular.woff2') format('woff2') | |
} | |
@font-face { | |
font-family: 'Roboto'; | |
font-style: normal; | |
font-weight: 500; | |
src: local(''), url('/fonts/roboto-v29-latin-500.woff2') format('woff2'), | |
} | |
@font-face { | |
font-family: 'Roboto'; | |
font-style: normal; | |
font-weight: 700; | |
src: local(''), url('/fonts/roboto-v29-latin-700.woff2') format('woff2') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment