• Tuempelkoenig

    (@tuempelkoenig)


    Hi,

    I load my local custom fonts via styles.css in my child theme using @font-face. They are getting inlined by your plugin. The

    On the site, the default system font is now displayed until the custom font is loaded, so that the font switches after approximately 0.5s – that looks pretty weird.

    How can I prevent this?
    Is there generally a way to exclude style.css (as it is not included through functions.php)?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Tuempelkoenig

    (@tuempelkoenig)

    Figured it out myself: Previously the text was just hidden until the font was loaded and then showed up. I read that you are using font-display: swap as google suggests and this creates the effect of all fonts changing on the site after approximately 1-200ms. For my feeling this results in a pretty weird visual effect.
    Is there a hook to prevent using swap? Are there any negative effects of not using it (except googles suggestion)?

    Plugin Author Albert Peschar

    (@kiboit)

    Hi @tuempelkoenig,

    Currently, there’s no setting to disable font-display: swap. But it’s a good idea to add this. I’m adding it to my list, but it’ll be a while ’til I get around to it.

    –Albert

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Load Custom Font’ is closed to new replies.