Streamline your web font requests. Introducing “text=”

Google Fonts provides the attribute text= for

Optimizing your font requests (Beta)
Helps, If you google fonts for particular texts then use it. In some cases, this can reduce the size of the font file by up to 90%.

Visit: https://developers.google.com/fonts/docs/getting_started?hl=en

How to Use?

Checkout below example. Here, Google Fonts apply only for text “LOGO”.

  1. Your Google Font with requested font text e.g. http://fonts.googleapis.com/css?family=Special+Elite&text=LOGO

Here, Added text=LOGO. So, Google Font apply only for the text ‘LOGO’.

NOTE: Here, It apply for UPPER CASE letters. If we use text-transform: uppercase;.
Then it apply for that text too.

[codepen_embed height=”268″ theme_id=”0″ slug_hash=”Wrojpa” default_tab=”result” user=”maheshwaghmare”]See the Pen <a href=’http://codepen.io/maheshwaghmare/pen/Wrojpa/’>Wrojpa</a&gt; by Mahesh Waghmare (<a href=’http://codepen.io/maheshwaghmare’&gt;@maheshwaghmare</a>) on <a href=’http://codepen.io’>CodePen</a&gt;.[/codepen_embed]

Advertisements