Filename extension |
|
---|---|
Internet media type | |
Magic number | |
Developed by | W3C |
Type of format | Font file |
Container for | SFNT fonts |
Website |
TheWeb Open Font Format (WOFF) is afont format for use inweb pages.WOFF files areOpenType orTrueType fonts, with format-specific compression applied and additionalXML 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.
The first draft of WOFF 1 was published in 2009 by Jonathan Kew, Tal Leming, andErik van Blokland,[3] with reference conversion code written by Jonathan Kew.[4] Following the submission of WOFF to theWorld Wide Web Consortium (W3C) by theMozilla Foundation,Opera Software andMicrosoft in April 2010,[5][6] the W3C commented that it expected WOFF to soon become the "single, interoperable [font] format" supported by all browsers.[7] The W3C published WOFF as aworking draft in July 2010.[8][9] Thefinal draft was published as aW3C Recommendation on 13 December 2012.[10]
WOFF 2.0 significantly improved compression efficiency compared to WOFF 1.0, primarily through the introduction ofBrotli, a new byte-level compression algorithm developed by Jyrki Alakuijala and Zoltan Szabadka. Brotli's effectiveness led to its widespread adoption, notably for HTTP content encoding. WOFF 2.0 was standardized as a W3C Recommendation in March 2018,[11] with Google providing the reference implementation.[12]
Each version of the format has received the backing of manytype foundries.[13]
WOFF is a wrapper containingSFNT-based fonts (TrueType orOpenType) 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 availablezlib compression (specifically, the compress2 function),[14] typically resulting in a file size reduction for TrueType files of over 40%.[15] Since OpenType CFF files (withPostScript glyph outlines) are already compressed, their reduction is typically smaller.[16]
Major web browsers support WOFF:
WOFF 2.0 is supported in:
Some browsers enforce asame-origin policy, preventing WOFF fonts from being used across different domains. This restriction is part of theCSS 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'sMIME type to serve the files correctly.[33] Since February 2017, the proper MIME type isfont/woff
for WOFF 1.0 andfont/woff2
for WOFF 2.0.[1][2] Prior to February 2017, the standard MIME type for WOFF 1.0 wasapplication/font-woff
, and some applications may still use the old type, though it is now deprecated.[1]
{{cite journal}}
:Cite journal requires|journal=
(help)