How do web fonts work?

Until recently, only web-safe system fonts – such as Arial and Georgia – could be used on websites. There was no legitimate way to use standard OpenType or TrueType fonts. Foundries were concerned about using real fonts on the web because existing formats like TrueType don’t provide any real piracy protection. The Embedded OpenType (EOT) format introduced by Microsoft in Internet Explorer 4 was a protected format, but it never really took off because it was a pain to compile the files.

Two key things triggered the web font revolution: the development of the Web Open Font Format (WOFF) in 2009, which is very easy to compile and offers the same protection as an EOT but is much easier to use; and browser support for that file, without which it would be meaningless. Font delivery networks such as Typekit (just acquired by Adobe), Fontdeck, WebINK and Web Fonts found a way of not only delivering these new files, but also the legacy files and TTFs wrapped in a fairly secure delivery method.

Some foundries may enable retrospective downloads of web fonts if you’ve already bought a licence, so it’s worth checking. Typekit has a free plan with some fonts included in that, and a tiered pricing system that provides access to more fonts for a monthly fee, or the option to buy yearly licences. Other services like Fontdeck offer a different pricing model where you purchase individual licences, akin to buying desktop fonts for print.

Distributors including FontShop supply some of their typefaces through Typekit, and will let you buy web font versions of premium typefaces that aren’t available there and either host them yourself or, for full browser support, you can use the option to ‘Send to Typekit’. Minnesota-based Process Type Foundry lets you buy directly and send to Typekit. So you can use premium fonts and have the benefit of being hosted and served securely.

Set-up differs from service to service, but you’ll always end up declaring your web fonts in CSS. If you’re using a service like Typekit or Fontdeck, you’ll be given a line of code to paste into your HTML header. If you’re hosting it on your own server, you need to set it up using the @font-face CSS rule – which you won’t see if you’re using Typekit or Fontdeck.

Then you need to call the font in your CSS. With most services, you simply write in the font family name. Free service Font Squirrel has a generator that outputs the correct file formats and CSS code, but you only need to worry about that if you’re hosting the fonts yourself. When declaring your font family name, always include fall-back fonts for older browsers that can’t load web fonts or in case your hosting service goes down.

Always bear in mind that the vast majority of fonts don’t look that good on Windows. They might look great on a Mac, but if you fire up Windows and Internet Explorer you’ll see how unreadable they are in comparison – so remember to test on multiple machines.

In addition, it’s also worth comparing different font services as the quality can vary – some have fonts that are better for Windows, some are more faithful to the original design and some might be a little bit skewed.

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of eight full-time members of staff: Editor Georgia Coggan, Deputy Editor Rosie Hilder, Ecommerce Editor Beren Neale, Senior News Editor Daniel Piper, Editor, Digital Art and 3D Ian Dean, Tech Reviews Editor Erlingur Einarsson and Ecommerce Writer Beth Nicholls and Staff Writer Natalie Fear, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.