![]() ![]() Once you have followed the steps, the error “Ensure text remains visinle during web font load” will be fixed. css file and click on the update file button. Step 4: Copy and paste the code below at the bottom of the. Please contact the plugin creators, if you are not sure where to find the css file of the custom font. Please note the every plugin will have different paths for the CSS file. In our case the CSS file is located inside the assets>CSS>bsf-custom-font.css. Step 2: Select the plugin that is responsible for injecting custom fonts on your website. Step 1: From your WordPress dashboard, navigate to the Plugins and select Plugin File Editor In this example, we are using a plugin developed by us named “Custom Font”. Here is an example on how to edit the plugin code. When you are using a plugin to insert custom fonts to your website, you will need to either contact the plugin creators or you can edit the plugin code. This will ensure that the browser loads the deafult fonts during the time any custom fonts are being downloaded. Once you have downloaded and install the plugin, it will automatically search for any Google Fonts script and will append display=swap to the URL. Google Fontsįor Google fonts, you can simply use the plugin named “Swap Google Fonts Display” which can be downloaded from here. ![]() Once the browser downloads the custom fonts, it should then swap the default fonts with the custom one. To rectify this error, you will need to ensure that during the time that the browser loads your custom font, it should displaythe default fonts. When you test the speed of the website, this reaction of the browser is responsible for showing the error “Ensure text remains visible during web font loading”. This normally doesn’t occur if you are using the default fonts however, mostly occurs when you are using a custom font or using a plugin to insert the custom fonts. The customised font is immediately used after it has finished downloading. When a browser detects that a text has a custom font applied, it waits for the font to download. In this document, we will explain how to fix this error while using the Astra theme. The solution is to change font-display method to swap or optional which is usually done in your cache plugin (check their documentation), by using a plugin, or by adding the font-display method in your font’s CSS. ![]() When you analyze the website with PageSpeed Insight, you might encounter this error that “Ensure text remains visinle during web font load” from time to time. If you ran your website through PageSpeed Insights, you may see a recommendation to ensure text remains visible during webfont load. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |