Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to reduce Google Web Fonts to one request if I'm using multiple fonts?

I ran a speed test on my website and one of the suggestions was to reduce my external requests. I am using 3 Google Web Fonts, in effect 3 separate requests. Is it posible to combine these into 1 request?

like image 586
Alexa Green Avatar asked Dec 19 '11 20:12

Alexa Green


People also ask

What is an important disadvantage of using Google Fonts?

Disadvantages of Google FontsMany of the typefaces only come in a few weights and styles (though this is becoming less of a problem). Despite the fact that the Google Fonts library is outstanding for a free resource, the selection is still limited.

How do I link multiple Google Fonts?

Open https://fonts.google.com/, select two font families by clicking a plus symbol "+" next to their title. Open the block titled "Family Selected" at the bottom of the screen. Copy the CSS link that contains both font families. In the Google Fonts tab, paste the link into the CSS input field.


2 Answers

You can combine several fonts with just one call using the | character. Example:

<link href='//fonts.googleapis.com/css?family=Cantarell|Terminal+Dosis' rel='stylesheet' type='text/css'>
like image 100
Bjorn Avatar answered Oct 22 '22 03:10

Bjorn


Yes you can load multiple fonts in single request like

<link rel='stylesheet' type='text/css' href='https://fonts.googleapis.com/css?family=Montserrat:400,700|Lato:300,400,700,900'>
like image 30
Muhammad Asif Avatar answered Oct 22 '22 03:10

Muhammad Asif