• Resolved Michael

    (@michael-luther)


    I noticed that in a Twenty Twenty Child theme the two font files of “Inter var” are loaded twice!

    This is very unpleasant, because the page loads 450 KB of unnecessary data and slows down the website.

    One solution could be to deregister the font and re-register it. However, I haven’t found the place where it will be registered yet.

    Who knows one or the solution? Many thanks for helpful answers!

    • This topic was modified 4 years, 11 months ago by Michael.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Michael, what does your functions.php file look like?

    Thread Starter Michael

    (@michael-luther)

    Hi Jarret,

    thank you for your answer. That’s a good question, but I definitely don’t load fonts in my functions.php.

    I took a look at the style.css file of the parent theme (Twenty Twenty) and noticed that the “Inter var” is actually loaded via stylesheet. There I removed the @font-face rule and the result is that it is really only loaded once.

    I wonder, however, where else is the font loaded? I searched the theme files and found nothing or I missed something.

    At least the double loading is now eliminated, even if the way is not correct.

    Thread Starter Michael

    (@michael-luther)

    After I observed the loading behavior of the font again, I noticed that the font “Inter var” was not loaded after all. A very strange behavior, because I had deactivated the browser cache when the developer tools were open, hmm. Also Autoptimze and the WordPress Cache was cleared.

    So, I’ll close the topic.

    Thread Starter Michael

    (@michael-luther)

    The cause doesn’t seem to be the Twenty Twenty theme.

    It is probably a problem with the current Firefox 70.0.1 or with its developer tools. Google Chrome loads all fonts only once. Also tests with Pingdom and GTmetrix show the fonts only once.

    this is the only thread i’ve found talking about font issues in Twenty Twenty, i have an issue with Chrome (macos 10.12, chrome 78.0.3904.108).

    the font doesn’t seem to load. the full page flashes up for a split second (using system fonts i guess) then most of the text disappears from the page after it tries to load the inter var font.

    any thoughts? everything seems fine on safari and firefox, although maybe they’re simply not removing the text when they can’t load the font

    Moderator James Huff

    (@macmanx)

    That’s a very different issue @joshr almost the opposite of what’s being discussed here.

    Would you please open your own thread? https://www.ads-software.com/support/theme/twentytwenty/#new-topic-0

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘In child theme font “Inter var” load twice’ is closed to new replies.