-
Anonymous
Hello,
I have downloaded and Installed a Font as per https://generatepress.com/local-font-library/ article. I have few queries:
– I want to Preload fonts so to avoid CLS with WP-Rocket https://docs.wp-rocket.me/article/1317-preload-fonts what should i provide in the preload font box. Do i need to preload fonts or GP already takes care or it?
– Where do i see the CSS being added by GP when i install font. Like Font face and font display ?
– Which option is best for font-display: property for minimizing CLS. GP by default keeps it at Auto.
[Update]
I did a performance analysis and confirmed that there is a CLS of 0.2 added after Installing the font.
GTMetrix is showing this woff2 font file. I am only using it in the body a 400 font weight. However the name of the woff file is random characters.
/wp-content/uploads/generatepress/fonts/inter/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0I5nvwU.woff2Irrespective of it, the main issue is of CLS. How can i fix the CLS issue while still using the font which I installed locally via Font library
-
Alvind
Hi there,
The hashed font name is expected if you’re using the option to download fonts via the Google Fonts API.
Regarding the CLS issue, ensure the font-display property is set to “auto” to minimize layout shifts. There are instances where caching plugins modify the font-display property. If that’s the case, you’ll need to review the caching plugin configuration.
- You must be logged in to reply to this topic.