Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

The Web Open Font Format (WOFF)

Nos bénévoles n'ont pas encore traduit cet article en Français. Aidez-nous à réaliser cette tâche !

WOFF (the Web Open Font Format) is a  web font format developed by Mozilla in concert with Type Supply, LettError, and other organizations. It uses a compressed version of the same table-based sfnt structure used by TrueType, OpenType, and Open Font Format, but adds metadata and private-use data structures, including predefined fields allowing foundries and vendors to provide license information if desired.

There are three main benefits to using WOFF:

  1. The font data is compressed, so sites using WOFF will use less bandwidth and will load faster than if they used equivalent uncompressed TrueType or OpenType files.
  2. Many font vendors that are unwilling to license their TrueType or OpenType format fonts for use on the web will license WOFF format fonts. This improves availability of fonts to site designers.
  3. Both proprietary and free-software browser vendors like the WOFF format, so it has the potential of becoming a truly universal, interoperable font format for the web, unlike other current font formats.

There are two versions of WOFF, WOFF and WOFF2, they mostly differ in regard to the compression algorithm used. In @font-face they are identified by the 'woff' and respectively 'woff2' format descriptor.

Using WOFF

You can use the @font-face CSS property to use WOFF fonts for text in web content. It works exactly like OpenType and TrueType format fonts do, except will likely let your content download more efficiently due to the addition of compression.

Tools for working with WOFF fonts

Specifications

Specification Status Comment
WOFF File Format 2.0 Candidate Recommendation New compression algorithm
WOFF File Format 1.0 Recommendation Initial specification.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 6.0 3.5 (1.9.1) 9.0 11.10 5.1
WOFF2 36 39 (39)[1] No support 24 No support
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? (Yes) 1.0 (1.9.1) ? ? ?
WOFF2 No support 38 39.0 (39)[1] No support ? No support

[1] WOFF2 supports from Gecko 35 to Gecko 38 included is only activated by default on Aurora and Nightly versions. To use it on Beta and Release versions, the user needs to set the gfx.downloadable_fonts.woff2.enabled preference to true.

See also

Étiquettes et contributeurs liés au document

 Contributeurs à cette page : fscholz, jwhitlock, Jeremie, teoli, DBaron, ethertank, Sheppy, jswisher, ziyunfei, Marsf
 Dernière mise à jour par : fscholz,