1

Whilst looking for the right solution for me, I have been looking at the question here Using fonts on websites: Webfonts vs downloaded fonts, and one of the answerers states:

The information given to you was seriously outdated—and unrealistic, since most people could not be bothered to download and install fonts.

I can be bothered to install fonts on my hosting server if it is beneficial to, and this is the crux of my question here.

The question I linked to here talks about the benefits of using Google Fonts when developing their site. Using CSS to import a Google Font for use by using for example:

@import url(//fonts.googleapis.com/css?family=Open+Sans);

then using the font in the body

body {
  font-family: 'Open Sans', sans-serif;
}

would definitely be beneficial when developing your site off the hosting server through systems such as Wamp as an example, but what about when using Google Fonts on a live site?

Do you get a site loading speed benefit using @import url(//fonts.googleapis.com/css?family=Open+Sans); or is it more speedy for site loading to download the fonts for use self-hosted?

1
  • 2
    I think you have misinterpreted the answer to the other question. "most people could not be bothered to download and install fonts" - "most people" in this context refers to the end-users, the actual visitors to the website, not the "developer" of the website. It would indeed be "unrealistic" to expect end-users to do this, but this is what would have been required in order to use an entirely custom font before @font-face (without using other tricks with images and Flash etc.) This is in reference to the out-of-date/incorrect Udemy course mentioned in the question.
    – MrWhite
    Oct 19 '20 at 12:07
4

Google compress their fonts for faster download and if you are using HTTP/1.1 then downloading the fonts from this seperate domain could also result in a performance improvement. Whether Google or local, the fonts will be cached by the user's browser after the first visit, so from then until the files expire the same browser won't need to download the font files again.

If you implement Google fonts, it's often a good idea to still implement the fonts locally as a fallback on the rare occasions that Google Fonts is not contactable.

4

From a speed POV using Googles fonts will normally be faster as (a) they will be cached and lots of sites use them and (b) Google will effectively be using a CDN to provide high speed results.

There are minor downsides - Doing it this way is another way that Google can track your viewers and you are reliant on Google not removing this functionality. These may not be practical concerns in reality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.