How to turn off local fonts to test google fonts?
If you are on a Mac just open up the 'Font Book' app and disable the font.
From Chrome 86, you can now disable local fonts in DevTools.
- Open DevTools
- Click the three dots in the top right
- Select More tools > Rendering
- Check Disable local fonts
- Refresh the page
This will ignore all local(...)
sources in CSS @font-face
rules.
Rather than renaming the font-family
, I would just omit or comment out the local()
function call in your src
descriptor. Without it, the browser will always load the font file(s) specified in your url()
function(s).
@font-face { font-family: "My Font"; font-weight: 400; font-style: normal; src: /* --> local("My Font") <-- */ url("/my-font.woff2") format("woff2"), url("/my-font.woff") format("woff")}