This article was written by John Daggett. John is a Mozilla contributor and has been working hard with font creators and web developers to improve the state of fonts on the web. This article is a high-level overview of whats different and shows some examples of WOFF in use. A full list of other supporting organizations can be found at the official Mozilla Blog.

In Firefox 3.5 we included support for linking to TrueType and OpenType fonts. In Firefox 3.6 we’re including support for a new font format – the Web Open Font Format, or WOFF. This format has two main advantages over raw TrueType or OpenType fonts.

  1. It is compressed, which means that you will typically see much smaller download sizes compared with raw TrueType or OpenType fonts.
  2. It contains information that allows you to see where the font came from – without DRM or labeling for a specific domain – which means it has support from a large number of font creators and font foundries.

The WOFF format originated from a collabaration between the font designers Erik van Blokland and Tal Leming with help from Mozilla’s Jonathan Kew. Each had proposed their own format and WOFF represents a melding of these different proposals. The format itself is intended to be a simple repackaging of OpenType or TrueType font data, it doesn’t introduce any new behavior, alter the @font-face linking mechanism or affect the way fonts are rendered. Many font vendors have expressed support for this new format so the hope is this will open up a wider range of font options for web designers.

Details on Differences between TrueType, OpenType and WOFF

First, compression is part of the WOFF format so web authors can optimize the size of fonts used on their pages. The compression format is lossless, the uncompressed font data will match that of the original OpenType or TrueType font, so the way the font renders will be the same as the original. Similar compression can be achieved using general HTTP compression but because compression is part of the WOFF format, it’s simpler for authors to use, especially in situations where access to server configuration is not possible.

Second, the format includes optional metadata so that a font vendor can tag their fonts with information related to font usage. This metadata doesn’t affect how fonts are loaded but tools can use this information to identify the source of a given font, so that those interested in the design of a given page can track down the fonts used on that page. Fonts in WOFF format are compressed but are not encrypted, the format should not be viewed as a “secure” format by those looking for a mechanism to strictly regulate and control font use.

Note: until Firefox 3.6 ships, users can test the use of WOFF fonts with Firefox nightly builds.

Examples

Below is a simple example that shows how to construct an @font-face rule that links to a WOFF font. To support browsers that only support direct linking to OpenType and TrueType fonts, the ‘src’ descriptor lists the WOFF font first along with a format hint (“woff”), followed by the TrueType version:

/* Gentium (SIL International) */
 
@font-face {
  font-family: GentiumTest;
  src: url(fonts/GenR102.woff) format("woff"),
       url(fonts/GenR102.ttf) format("truetype");
}
 
body {
  font-family: GentiumTest, Times, Times New Roman, serif;
}

Structured this way, browsers that support the WOFF format will download the WOFF file. Other browsers that support @font-face but don’t yet support the WOFF format will use the TrueType version. (Note: IE support is a bit trickier, as discussed below). As WOFF is adopted more widely the need to include links to multiple font formats will diminish.

Other examples below demostrate the use of WOFF formatted fonts but each example has been constructed so that it will work in any browser that supports @font-face, including Internet Explorer.

A font family with multiple faces

Using a Postscript CFF font

African Language Display

Below is an example of how downloadable fonts can be used to render languages for which font support is usually lacking. The example shows the UN Declaration of Human Rights, translated into two African languages, and how these render with default browser fonts vs. with a downloadable font suited for rendering these languages.

Note that in one of these examples that the font size goes from a 3.1MB TTF to a 1MB WOFF font and in the other from a 172KB TTF to an 80KB WOFF file.

Another Postscript CFF font

An example in Japanese

Working With Other Browsers

Firefox 3.6 will be the first shipping browser to support the WOFF format so it’s important to construct @font-face rules that work with browsers lacking WOFF support. One thing that helps greatly with this is the use of format hints to indicate the format of font data before it’s downloaded; browsers that don’t recognize a given format simply skip data in a format they don’t support.

Internet Explorer, including IE8, only supports the EOT font format and only implements a subset of the @font-face rule descriptors. This makes creating cross-platform @font-face rules that work with IE especially tricky. One solution is to make different rules for IE:

@font-face {
  font-family: GentiumTest;
  src: url(fonts/GenR102.eot);  /* for IE */
}
 
@font-face {
  font-family: GentiumTest;
  /* Works only in WOFF-enabled browsers */
  src: url(fonts/GenR102.woff) format("woff"); 
}

One minor downside of this is that IE doesn’t understand format hints and doesn’t parse @font-face URL’s correctly, it treats format hints as part of the URL, so web authors using the @font-face rules above will see the following in their access logs:

GET /fonts/GenR102.eot HTTP/1.1" 200 303536
GET /fonts/GenR102.woff)%20format(%22woff%22) HTTP/1.1" 404 335

IE successfully pulls down and uses the EOT version of the font but also tries to pull down the WOFF font with the format hint included in the URL. This fails and doesn’t affecting page rendering but it wastes valuable server resources. For more discussion, see Paul Irish’s blog post for one interesting workaround.

Another problem is that IE currently tries to download all fonts on the page, whether they are used or not. That makes site-wide stylesheets containing all fonts used on site pages difficult, since IE will always try to download all fonts defined in @font-face rules, wasting lots of server bandwidth.

Further Resources

Documentation

Latest draft WOFF specification
Original blog post on using @font-face
CSS3 Fonts working draft
MDC @font-face documentation

Tools

Jonathan Kew’s sample encoding/decoding code
woffTools – tools for examining and validating WOFF files
FontTools/TTX – Python library and tool for manipulating font data
Web-based font subsetting tool

General @font-face Examples

CSS @ Ten: The Next Big Thing
Example layout using Graublau Sans
Examples of Interesting Web Typography
The Elements of Typographic Style Applied to the Web

Font Resources

Font Squirrel
10 Great Free Fonts for @font-face
40 Excellent Free Fonts by Smashing Magazine

252 comments

Post a comment
  1. Pingback from Mozilla forges ahead with Firefox 3.6 « Geeks On Call on January 21st, 2010 at 1:34 pm:

    [...] from encroaching on Firefox’s file system turf to increase stability; support for the Web Open Font Format, which means users viewing pages in other languages should see faster load times via downloadable [...]

    Reply

  2. Pingback from Mozilla Firefox 3.6 a fost lansat - detalii tehnice | WorldIT on January 21st, 2010 at 1:42 pm:

    [...] pentru fonturi are acum pe langa OpenType si TrueType , implementat si Web Open Font Format (WOFF) • Gradienturi CSS : Firefox 3.6 suporta acum gradienturile liniare si radiale pentru CSS ce [...]

    Reply

  3. Pingback from Firefox 3.6 Yayınlandı on January 21st, 2010 at 1:48 pm:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  4. Pingback from Firefox 3.6 Officially Available, Brings Speed Increases, One-Click Themes, and More – Firefox 3.6 – Lifehacker | digital environments on January 21st, 2010 at 2:14 pm:

    [...] intriguing for developers than users, but, still, Firefox now accepts and downloads smaller-sized Web Open Font Format fonts, allowing sites to more quickly show you their text the way they [...]

    Reply

  5. Pingback from Firefox 3.6 Available For Download – What’s New – Enhanced Browsing Speed, One Click Personas and Lot More on January 21st, 2010 at 2:32 pm:

    [...] Font Support: In addition to OpenType and TrueType fonts, 3.6 now supports the new Web Open Font Format (WOFF) [...]

    Reply

  6. Pingback from Firefox 3.6 Officially Available, Brings Speed Increases, One-Click Themes, and More [Downloads] | TechBlogs Today on January 21st, 2010 at 2:41 pm:

    [...] intriguing for developers than users, but, still, Firefox now accepts and downloads smaller-sized Web Open Font Format fonts, allowing sites to more quickly show you their text the way they [...]

    Reply

  7. Pingback from Llega Firefox 3.6 « Abraham's Sci-Tech Blog on January 21st, 2010 at 2:41 pm:

    [...] Soporte para Web Open Font Format. [...]

    Reply

  8. Pingback from Firefox 3.6 Officially Available, Brings Speed Increases, One-Click Themes, and More [Downloads] « Coolbeans on January 21st, 2010 at 2:45 pm:

    [...] intriguing for developers than users, but, still, Firefox now accepts and downloads smaller-sized Web Open Font Format fonts, allowing sites to more quickly show you their text the way they [...]

    Reply

  9. Pingback from Firefox 3.6 disponible en version finale | traffic-internet.net on January 21st, 2010 at 2:46 pm:

    [...] Support permanent pour les polices Web téléchargeables via le nouveau format de police WOFF. [...]

    Reply

  10. Pingback from Firefox 3.6 Released — Aurum3 NewTech : New Technology, Games and Gadget Guide on January 21st, 2010 at 2:56 pm:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  11. Pingback from Mozilla Firefox 3.6 Now Available | The Software Nook on January 21st, 2010 at 3:26 pm:

    [...] Support: In addition to OpenType and TrueType fonts, 3.6 now supports the new Web Open Font Format (WOFF) CSS gradients: Supports linear and radial CSS gradients which allow for a smoother transition [...]

    Reply

  12. Pingback from Les nouvelles fonctionnalités de Firefox 3.6 | Miary RABEHASY on January 21st, 2010 at 3:29 pm:

    [...] En plus des polices de caractères de type OpenType et TrueType, Firefox 3.6 supporte maintenant les polices standards Web Open Font Format (WOFF). [...]

    Reply

  13. Pingback from Firefox 3.6 | Trination Media on January 21st, 2010 at 4:06 pm:

    [...] intriguing for developers than users, but, still, Firefox now accepts and downloads smaller-sized Web Open Font Format fonts, allowing sites to more quickly show you their text the way they [...]

    Reply

  14. Pingback from The Cheap Computer Geek » Blog Archive » Mozilla forges ahead with Firefox 3.6 on January 21st, 2010 at 4:50 pm:

    [...] from encroaching on Firefox’s file system turf to increase stability; support for the Web Open Font Format, which means users viewing pages in other languages should see faster load times via downloadable [...]

    Reply

  15. Pingback from Firefox 3.6 wydany | thecamels.org on January 21st, 2010 at 4:53 pm:

    [...] Ulepszona obsługa czcionek WWW dzięki nowemu formatowi WOFF. [...]

    Reply

  16. Pingback from Firefox 3.6 Officially Available, Brings Speed Increases, One-Click Themes, and More [Downloads] | Computer Tips and Tricks on January 21st, 2010 at 5:48 pm:

    [...] intriguing for developers than users, but, still, Firefox now accepts and downloads smaller-sized Web Open Font Format fonts, allowing sites to more quickly show you their text the way they [...]

    Reply

  17. Pingback from Firefox 3.6 disponible en version finale « Mon blog on January 21st, 2010 at 5:50 pm:

    [...] Support permanent pour les polices Web téléchargeables via le nouveau format de police WOFF. [...]

    Reply

  18. Pingback from Firefox 3.6 out now | The PC Report on January 21st, 2010 at 6:36 pm:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  19. Pingback from Firefox 3.6 Officially Available, Brings Speed Increases, One-Click Themes, and More [Downloads] on January 21st, 2010 at 7:03 pm:

    [...] intriguing for developers than users, but, still, Firefox now accepts and downloads smaller-sized Web Open Font Format fonts, allowing sites to more quickly show you their text the way they [...]

    Reply

  20. Pingback from MozillaZine.jp » Blog Archive » Firefox 3.6 がリリースされた on January 21st, 2010 at 7:10 pm:

    [...] サポートや、新しいウェブフォントの形式である Web Open Font Format (WOFF) 形式のサポートが注目される。また、background size や gradients [...]

    Reply

  21. Pingback from » Firefox 3.6: rilascio ufficiale on January 21st, 2010 at 7:40 pm:

    [...] alla visualizzazione dei video full screen e supporto per poster frames – Supporto per il formato WOFF dei fonts – Migliorata performance di JavaScript; tempo di avvio e reattività generale del browser [...]

    Reply

  22. Pingback from Awesome Techs » Mozilla Launches Firefox 3.6 on January 21st, 2010 at 8:46 pm:

    [...] Font Support: In addition to OpenType and TrueType fonts, 3.6 now supports the new Web Open Font Format (WOFF) [...]

    Reply

  23. Pingback from The New Firefox 3.6 is Here! | Tech Hamlet on January 21st, 2010 at 11:48 pm:

    [...] Font Support: In addition to OpenType and TrueType fonts, 3.6 now supports the new Web Open Font Format (WOFF) [...]

    Reply

  24. Pingback from Firefox 3.6 Released | Latest & Newest News | FREE Informations on January 21st, 2010 at 11:50 pm:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  25. Trackback from LaBoX on January 21st, 2010 at 11:57 pm:

    How-To Implement Cross-Browser @font-face Support…

    Firefox 3.6 “Final” was released today and one of the major addition is the support for the Web Open Font Format or WOFF. The result of a collaboration between the font designers Erik van Blokland and Tal Leming with help from Mozilla’s Jonathan Kew…

    Reply

  26. Pingback from Mozilla forges ahead with Firefox 3.6 on January 22nd, 2010 at 12:15 am:

    [...] on Firefox’s file system turf to increase stability; support for the Web Open Font Format, which means users viewing pages in other languages should [...]

    Reply

  27. Pingback from Ya tenemos disponible el firefox 3.6 « El rincón de Tolgalen on January 22nd, 2010 at 12:40 am:

    [...] Implementación continuada de tipografías web descargables usando el nuevo formato WOFF de tipografías. [...]

    Reply

  28. Pingback from Rilasciato Firefox 3.6, prestazioni e personalizzazioni | TUXJournal.net on January 22nd, 2010 at 12:58 am:

    [...] per aggiornarli con una certa regolarità. Migliorato inoltre il supporto a nuovi attributi CSS (WOFF) e a nuove specifiche DOM e HTML5, incluse le API per la gestione di Drag & Drop e File, con la [...]

    Reply

  29. Pingback from Rilasciato Firefox 3.6, prestazioni da record | PCTricks.it on January 22nd, 2010 at 2:15 am:

    [...] per aggiornarli con una certa regolarità. Migliorato inoltre il supporto a nuovi attributi CSS (WOFF) e a nuove specifiche DOM e HTML5, incluse le API per la gestione di Drag & Drop e File, con la [...]

    Reply

  30. Pingback from Mozilla Firefox Releases Version 3.6! | The Clarksburg Post-Intelligencer on January 22nd, 2010 at 4:37 am:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  31. Pingback from Firefox 3.6 Officially Available, Brings Speed Increases, One-Click Themes, and More [Downloads] - 25 Popular Blogs - Popular Bloggers.com on January 22nd, 2010 at 5:20 am:

    [...] intriguing for developers than users, but, still, Firefox now accepts and downloads smaller-sized Web Open Font Format fonts, allowing sites to more quickly show you their text the way they [...]

    Reply

  32. Pingback from wirefresh » Firefox hits v3.6, throws up funky one click themes, speedier browsing on January 22nd, 2010 at 5:29 am:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  33. Pingback from Nueva versión de Firefox 3.6 | Shadow Security on January 22nd, 2010 at 6:58 am:

    [...] Soporte para fuentes (Fonts): En adición del soporte para fuentes de OpenType y TrueType , ahora Firefox 3.6 soporta el nuevo formato Web Open Font Format (WOFF) [...]

    Reply

  34. Pingback from Mozilla launches Firefox 3.6 « System Dioxide on January 22nd, 2010 at 7:07 am:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  35. Pingback from Mozilla Firefox ver3.6 for Mac | iMUG on January 22nd, 2010 at 8:36 am:

    [...] intriguing for developers than users, but, still, Firefox now accepts and downloads smaller-sized Web Open Font Format fonts, allowing sites to more quickly show you their text the way they [...]

    Reply

  36. Pingback from Firefox 3.6 Now Available - Computer Juice - Forums on January 22nd, 2010 at 8:40 am:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  37. Pingback from Firefox 3.6 è tra noi « sinalfa.net on January 22nd, 2010 at 9:54 am:

    [...] Supporto esteso per i caratteri scaricabili utilizzando il nuovo formato di carattere WOFF. [...]

    Reply

  38. Pingback from Firefox 3.6 final | Razumite Apstraktno on January 22nd, 2010 at 10:08 am:

    [...] Nastavak podrške za download-abilne web fontove korišćenjem novog WOFF font formata. [...]

    Reply

  39. Pingback from Firefox 3.6 Released, First Web FontFont Is Free | The FontFeed on January 22nd, 2010 at 11:23 am:

    [...] Mozilla launched Firefox 3.6, which — among more frivolous features — supports WOFF (Web Open Font Format), the downloadable webfont format supported by most major font vendors. This [...]

    Reply

  40. Pingback from Firefox 3.6 released | BLOGS@DiGiTSS on January 22nd, 2010 at 12:42 pm:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  41. Pingback from Tuutz » Mozilla Firefox 3.6 erschienen on January 23rd, 2010 at 8:53 am:

    [...] Weitere Unsterstützung für herunterladbare Schriftarten unter Verwendung des neuen WOFF-Schriftartenformats. [...]

    Reply

  42. Pingback from :: Technolobia :: » Blog Archive » Firefox 3.6 Released and is Faster Than Ever! on January 23rd, 2010 at 9:44 am:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  43. Pingback from Firefox 3.6 oficial | Mi Mundo Azul on January 23rd, 2010 at 9:19 pm:

    [...] Soporta el formato de fuentes WOFF [...]

    Reply

  44. Pingback from MTPH Software: Blog : Check It Out – Firefox 3.6 : on January 24th, 2010 at 1:02 am:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  45. Pingback from Firefox 3.6 Is here! « El Blog de Luis Tovar on January 24th, 2010 at 1:29 am:

    [...] Implementación continuada de tipografías web descargables usando el nuevo formato WOFF de tipografías. [...]

    Reply

  46. Pingback from Geek's Nux Users » Blog Archive » Firefox 3.6 est arrivé ! on January 24th, 2010 at 4:30 am:

    [...] La version 1.9.2 du moteur de rendu Gecko est optimisée pour fonctionner sur des systèmes d’exploitation pour mobiles tels que Windows CE ou Maemo. Elle ajoute, entre autres, le support des polices WOFF, qui, contrairement aux autres formats de polices (True Type et OpenType), sont compressées, ce qui permet un meilleur rendu de texte. On l’utilise dans une feuille de style (CSS) avec la propriété @font-face , comme l’indique le blog « Mozilla Hack ». [...]

    Reply

  47. Pingback from Firefox 3.6 released « Fran's Computer Services' Blog on January 24th, 2010 at 8:17 am:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  48. Pingback from Check It Out – Firefox 3.6 | Computer Software on January 24th, 2010 at 2:32 pm:

    [...] Continued support for downloadable web fonts using the new WOFF font format. [...]

    Reply

  49. Pingback from Firefox 3.6 et ses polices WOFF | Tutoweb on January 24th, 2010 at 6:31 pm:

    [...] approfondir le sujet et tester: « WOFF for Firefox 3.6 ». [...]

    Reply

  50. Pingback from Upgrade Firefox Anda Ke 3.6 | UINFORMATIKA on January 24th, 2010 at 9:27 pm:

    [...] Melanjutkan dukungan untuk web download font yang baru dengan menggunakan format font WOFF. [...]

    Reply

1 2 3 4 5

Add your comment

  1.