how to use next font google in a server with blocked internet access #65595
Unanswered
alexmondaini
asked this question in
Help
Replies: 2 comments 2 replies
-
You can download the fonts, then add them to the public folder and import/use those as local fonts. Or you can add them anywhere and just import them, this might make your bundles a bit bigger but you won't need to download the from Google API. |
Beta Was this translation helpful? Give feedback.
0 replies
-
ok, did that but noticed that while the page is loading there is a shift between one font and the other, is this normal ? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I am new to the javascript world and next.js , and my environment blocks access to google apis which are accessed when a new font from googe is imported. I am following this tutorial from next.js https://nextjs.org/learn/dashboard-app/optimizing-fonts-images and the idea is to set my app/layout.tsx like that:
and app/ui/fonts like this:
The problem is that download step on my server will not work, and then another font is used as a fallback. I would like to use fonts from google in my project. What is the way to go in that scenario ?
Thanks
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions