The Web Open Font Format (WOFF) is a font format for use in web pages.
WOFF files are OpenType or TrueType fonts, with format-specific compression applied and additional XML metadata added.
The two primary goals are first to distinguish font files intended for use as web fonts from fonts files intended for use in desktop applications via local installation, and second to reduce web font latency when fonts are transferred from a server to a client over a network connection.
WOFF 2.0, with reference code provided by Google,[11] has an improved compression scheme, using Brotli for byte-level compression, and became a W3C Recommendation in March 2018.[12]
Each version of the format has received the backing of many type foundries.[13]
Specification
WOFF is a wrapper containing SFNT-based fonts (TrueType or OpenType) that have been compressed using a WOFF-specific encoding tool so they can be embedded in a Web page.[14] WOFF Version 1 uses the widely available zlib compression (specifically, the compress2 function),[14] typically resulting in a file size reduction for TrueType files of over 40%.[15] Since OpenType CFF files (with PostScript glyph outlines) are already compressed, their reduction is typically smaller.[16]
Some browsers enforce a same-origin policy, preventing WOFF fonts from being used across different domains. This restriction is part of the CSS 3 Fonts module,[32] where it applies to all font formats and can be overridden by the server providing the font.
Some servers may require the manual addition of WOFF's MIME type to serve the files correctly.[33] Since February 2017, the proper MIME type is font/woff for WOFF 1.0 and font/woff2 for WOFF 2.0.[1][2] Prior to February 2017, the standard MIME type for WOFF 1.0 was application/font-woff, and some applications may still use the old type, though it is now deprecated.[1]