Inter var file containing only the needed font weight range? #449
-
I have been using Inter from Heroku for quite some time, but decided recently to switch to variable fonts to reduce the number of http requests. However, the available Inter-roman.var.woff2 file is way larger in size than my standard ones: Standard from Heroku:
Variable from rsms/inter:
This led to an average 5 points decrease on Google PageSpeed on mobile which is huge. The website is already over-optimized and I made sure that the connection was stable. The moment I switch back to std/var fonts, the score increased/decreased on average by 5. Worse, there is a new warning on Google PageSpeed:
Way bigger size, slower, worst speed score. Two questions:
If you could help me, I would be infinitely grateful! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You also mention:
This is a simple fix—use the CSS @font-face {
font-family: 'Inter';
src: url('your-font-url.woff2') format('woff2');
font-display: swap;
} Hope that helps! |
Beta Was this translation helpful? Give feedback.
You also mention:
This is a simple fix—use the CSS
font-display: swap
declaration in your@font-face
, like so:@…