• Resolved stevert

    (@stevert)


    Hi,
    I have a question regarding the use of Google fonts. If I do choose a Google font and also enable to serve them from my own server, will the whole font-family be loaded, even if I only use two weights(i.e. regular and bold)? Or will only these two weights be loaded onto my server?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author David Vongries

    (@davidvongries)

    Hi @stevert,

    thanks for reaching out! 🙂

    The entire font-family is being downloaded to your server & served on the front-end.

    Here’s why:

    Let’s say you’ve chosen Font XY with font-weight regular (400) – making a certain string bold or italic in the wysiwyg editor/Gutenberg may cause issues on machine where the font isn’t installed.

    Hope that helps!

    Best,
    David

    Thread Starter stevert

    (@stevert)

    Hi,
    thanks for you reply. Well since I only use the regular and bold(700) font weight I don’t need all other weights or italic…so it’s a big load for the server to host all weights.

    Theme Author David Vongries

    (@davidvongries)

    Hi @stevert,

    I was wrong stating all fonts would be loaded.

    Only the fonts that are being used on the front-end are actually being loaded.

    I ran a test at https://performance.wp-pagebuilderframework.com/ loading Open Sans from Google & hosting them locally.

    Here are the results.

    https://wp-pagebuilderframework.com/wp-content/uploads/self-hosted-vs-google-fonts-comparison.jpg

    Not saying fonts should be hosted locally in general, Google is actually pretty fast and serves the fonts through a CDN.

    Personally, we host Google fonts locally to comply with GDPR or if there are no more than 2-3 fonts to load.

    Thread Starter stevert

    (@stevert)

    Interesting! I have always found it faster to load from Google, but of course with the GPDR it’s a bit risky.

    Thank you for the help!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Google fonts’ is closed to new replies.