Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Font hosted locally

  • Hello,

    I changed typography to host locally (to be in accordance with GDPR) however it takes a while before the font changes from default one to the one that is chosen. Is there any method to keep hosting font locally but make them load faster?

  • Hi there,

    You can try preloading the fonts by adding the below HTML to a hook element, set the hook name to wp_head.

    Change the href and type to the actual ones:

    <link rel="preload" href="http://example.com/path/to/fonts/local-font1.woff2" as="font" type="font/woff2" crossorigin>
    <link rel="preload" href="http://example.com/path/to/fonts/local-font2.woff2" as="font" type="font/woff2" crossorigin>
  • Thank you. Intype should I use a font name, like below?

    type=”poppins/woff2″ crossorigin>

  • Hi there,

    no the type should remain as Ying provided. ie. as="font" type="font/woff2" crossorigin>

    But … before you do that.
    In your Customizer > Additional CSS you have some other @font-face CSS, and ALL those fonts are returning a 404 Not Found error. I don’t think you need that CSS, so remove that so the browser does not waste time trying to load them.

  • works well now, thank you very much

  • Glad to hear that!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.