Will adding custom fonts increase the load times?
Unanswered
Pollock posted this in #help-forum
PollockOP
I am trying to use custom font in next.js project. The font is having 20 files .ttf , .woff, .eot, .woff2 for every font weight.
The total size is 20mb. Should I really push all these files in git repo?
Wouldn't this make my next.js app slow? Yes, I intend to use most if not all the weights.
Will all these fonts download when app loads?
The total size is 20mb. Should I really push all these files in git repo?
Wouldn't this make my next.js app slow? Yes, I intend to use most if not all the weights.
Will all these fonts download when app loads?
2 Replies
@Pollock I am trying to use custom font in next.js project. The font is having 20 files .ttf , .woff, .eot, .woff2 for every font weight.
The total size is 20mb. Should I really push all these files in git repo?
Wouldn't this make my next.js app slow? Yes, I intend to use most if not all the weights.
Will all these fonts download when app loads?
Raspberry Horntail
Hi.
By default, browsers will download all requested font files.
If you use multiple weights and styles in your CSS, those will be downloaded when the app loads.
You can conditionally load fonts based on the pages or components that need them, but this can be more complex to manage.
By default, browsers will download all requested font files.
If you use multiple weights and styles in your CSS, those will be downloaded when the app loads.
You can conditionally load fonts based on the pages or components that need them, but this can be more complex to manage.
Original message was deleted
Please do not use AI generated content here. Answer with your own words.