Family Mobile Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 26 April 2011

Streamline your web font requests. Introducing “text=”

Posted on 11:45 by Unknown
Oftentimes, when you want to use a web font on your website or application, you know in advance which letters you’ll need. This often occurs when you’re using a web font in a logo or heading.

That’s why we’re introducing a new beta feature to the Google Web Fonts API. The feature is called “text=”, and allows you to specify which characters you’ll need. To use it, simply add “text=” to your Google Web Fonts API requests. Here’s an example:
<link
href='http://fonts.googleapis.com/css?family=Special+Elite&text=MyText'
rel='stylesheet' type='text/css'>

Google will optimize the web font served based on the contents of this parameter. For example, if you only require a few letters for a logo, such as “MyText”, Google will return a font file that is optimized to those letters. Typically, that means Google will return a font file that contains only the letters you requested. Other times, Google might return a more complete font file, especially when that will lead to better caching performance.

The “text=” parameter has the potential to dramatically cut down web font file size. In some preliminary studies, web fonts can be cut from 35k down to just 5k (or even smaller), if only short strings of text are required. If you have a longer string, you can shorten the request by removing duplicate characters, as the order of characters in the string doesn’t matter.

The effect of this feature is even more pronounced on mobile devices, where connection speeds are limited. Using the text= parameter, you can ensure your users will have a great, quick loading experience.

We’re happy to say that the feature also works for international fonts. There’s no need to also specify the subset= parameter, as text= has access to all the characters in the original font. To access Unicode characters, use standard technique of url-encoding the UTF-8 representation of the string. Therefore, ¡Hola! is represented as: text=%c2%a1Hola! .

Enjoy!

Posted by Raph Levien, Engineer, Google Web Fonts
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Extensis plug-in now supports Google Web Fonts
    Do you use Photoshop® to design your website? Looking to spice it up with cool web fonts like Lobster or Dancing Script ? Well, now you can...
  • Kickstart new fonts!
    Google Web Fonts is proud to announce a new funding experiment, using Kickstarter - a popular way to fund creative projects. Each month the...
  • Navigate the font directory more easily and submit your fonts
    To make it easier for you to navigate all the tools and documentation that are part of the Font API we have created a unified navigation for...
  • Scary Fonts For Halloween
    Halloween is here - what a fun time of year! The pumpkins are carved and the seeds are roasting in the oven, a chill is in the air, and all ...
  • The New Face of Google Web Fonts
    As we talked about at our Google IO session , the Google Web Fonts team has been hard at work designing a new font browsing experience for w...
  • Introducing the Ubuntu Font Family to the web
    Google and the Ubuntu project have today released the Ubuntu Font Family to the world through the Google Font Directory. The new Ubuntu Fon...
  • Interview with Astigmatic
    We recently got a hold of Brian Bonislawsky, founder of the Astigmatic One Eye Typographic Institute , to describe his design process and mo...
  • New Fonts for the New Year
    The Google Font team is excited to announce the addition of a handful of high-quality web fonts for you to use freely on your website or blo...
  • Interview with Polish Type Designer Ania Kruk
    Ania Kruk is a type designer from Poznan, Poland. She currently lives and works in Barcelona and Google Web Fonts is proud to include her fi...
  • Web fonts go mobile
    Google Fonts now work for the vast majority of mobile devices, including Android 2.2+ devices, iPhone and iPad! And now with the recent rel...

Categories

  • adobe
  • google documents
  • google fonts
  • halloween
  • interview
  • kickstarter
  • monotype
  • new fonts
  • ofl
  • omnibus type
  • rosario
  • typekit
  • ubuntu
  • web fonts

Blog Archive

  • ►  2013 (3)
    • ►  May (1)
    • ►  April (2)
  • ►  2012 (10)
    • ►  October (1)
    • ►  September (1)
    • ►  August (3)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
    • ►  January (1)
  • ▼  2011 (13)
    • ►  November (2)
    • ►  October (2)
    • ►  September (1)
    • ►  July (1)
    • ►  June (2)
    • ▼  April (1)
      • Streamline your web font requests. Introducing “te...
    • ►  March (2)
    • ►  February (1)
    • ►  January (1)
  • ►  2010 (11)
    • ►  December (3)
    • ►  November (2)
    • ►  October (2)
    • ►  September (3)
    • ►  August (1)
Powered by Blogger.

About Me

Unknown
View my complete profile