-
AuthorPosts
-
September 13, 2021 at 12:06 pm #1320711
Could someone tell me what this font glitch is? (See video below, and notice what happends every time i refresh the page)
September 14, 2021 at 7:25 am #1320848Hey adferger1,
Thank you for the inquiry.
Which font are you currently using? What you see is called FOUT or “flash of unstyled text”. You can read more about it in the following article.
// https://css-tricks.com/fighting-foit-and-fout-together/
The text “flashes” or changes because the font file is not yet loaded. Installing a cache plugin in this case usually helps.
If you are a developer, make sure that the browser is not set to “Disable Cache”, because when this option is enabled, the browser always retrieves the font files from the original source instead of the local machine, which may cause FOUT. You will usually find this option in the Networks tab of the developer tools.
Best regards,
IsmaelSeptember 14, 2021 at 8:06 am #1320854I have removed the “disable cache” now. And also installed Litespeed cache as recommended by my webhost.
I have setup cloudflare as well.The font stil flashes
September 15, 2021 at 12:04 pm #1321024Hi,
Thank you for the update.
Where can we see the issue? Please provide the site URL in the private field so that we can check it. You may have to disable the Enfold > Performance > File Compression settings temporarily.
Best regards,
IsmaelSeptember 15, 2021 at 1:11 pm #1321032Here
September 16, 2021 at 7:14 am #1321146Hi,
For some reason, the font files (Lato, Opens Sans) in the above site are added last, only after every stylesheets and scripts are loaded, which causes FOUT. On our installation, the font files are loaded first as shown in the screenshot below.
finansgruppen: https://postimg.cc/FfDJ90Xn
localsite: https://postimg.cc/w7TZMpNfDid you modify any of the theme files?
Best regards,
IsmaelSeptember 16, 2021 at 7:33 am #1321152No. Clean install, imported the demo content and selected Enfold 2017 as style
September 17, 2021 at 8:32 am #1321342Hi,
Try to modify the enfold\framework\php\class-style-generator.php file and look for this code around line 767.
document.getElementsByTagName('head')[0].appendChild(f);
Replace it with:
document.getElementsByTagName('head')[0].prepend(f);
This should prepend the font files at the very top of the head tag, loading them first. Let us know if that helps.
Best regards,
IsmaelSeptember 27, 2021 at 8:58 pm #1322542It did not work.
Also: I would think that editing php files seems a bit extreme, in order to fix something that should be working out-of-the-boxSeptember 30, 2021 at 2:14 am #1322890Hi,
It is actually working properly on our end (screenshots above), but for some reason it’s not working on your installation. It is also a minor modification, which relocates the position of the stylesheet or link element in the head tag. Please post the FTP details in the private field so that we can access the file server and test the modification.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.