Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Font is changing briefly when reloading page

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

When (re)loading the page, the font is briefly changing to a different font and then jumping back to the right one. I made a screenshot of the settings in the template. I changed it to Google fonts. Might that be a problem?
I would like it to be the chosen font, right away, when loading the page.

wwwneu.moessinger.at/index.php/campus/schulentwicklung

Cheers.

Attachment Bildschirmfoto2016-10-31um09.17.00.png not found

  • Stefan Waldhauser's Avatar
  • Stefan Waldhauser
  • 6 Month Developer
  • 28 posts
  • Karma: 0
Last Edit: 4 years 9 months ago by Stefan Waldhauser.
The administrator has disabled public write access.
Hi,

This is because the webfonts use the javascript loader, and when people initially load the page, they do not have the fonts on their device, so they can only show once they have been downloaded, at which point, they replace the fonts that load initially.

I think the easiest way to fix it would be to go to the google fonts page for the fonts that you are using, and then copy the css links they give you to load the font in a site and then paste them into the custom code area of the template settings in the head section of the page.

That way the fonts will be a blocking resource and the page will not be able to render until the fonts have been downloaded to the device.

Regards,

Rob
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
The following user(s) said Thank You: Stefan Waldhauser
For the fonts and weights you are using, you would need to add:
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600|Merriweather+Sans:300" rel="stylesheet">
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
The following user(s) said Thank You: Stefan Waldhauser

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers