Web Open Font Format

{{redirect2|WOFF|Woff|other uses|WOFF (disambiguation)}}

{{short description|File format for fonts in web pages}}

{{Infobox file format

| name = Web Open Font Format

| icon =

| logo =

| screenshot =

| caption =

| _noextcode = on

| extension = {{unbulleted list|{{code|.woff}}|{{code|.woff2}}}}

| _nomimecode = on

| mime = {{unbulleted list|{{code|font/woff}}|{{code|font/woff2}}|{{code|application/font-woff}} (deprecated){{cite web

|title=Media Types

|url=https://www.iana.org/assignments/media-types/media-types.xhtml

|publisher=IANA

|date=2017-10-12

|access-date=2017-10-17

}}{{cite journal

|title=The "font" Top-Level Media Type

|rfc=8081

|url=https://tools.ietf.org/html/rfc8081

|publisher=IETF

|date=February 2017

|access-date=2017-10-17

|last1=Lilley

|first1=Chris

|doi=10.17487/RFC8081

}}}}

| type code =

| uniform type =

| magic = {{unbulleted list|77 4F 46 46 ("wOFF" in ASCII)|77 4F 46 32 ("wOF2" in ASCII)}}

| owner = W3C

| released =

| latest release version =

| latest release date =

| genre = Font file

| container for = SFNT fonts

| contained by =

| extended from =

| extended to =

| standard =

| free =

| url = {{unbulleted list|{{URL|https://w3.org/TR/WOFF/}}|{{URL|https://w3.org/TR/WOFF2/}}}}

}}

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.

Standardization

The first draft of WOFF 1 was published in 2009 by Jonathan Kew, Tal Leming, and Erik van Blokland,{{Citation|last1=Kew (Mozilla)|first1=Jonathan|title=WOFF File Format (draft of 2009-10-23)|date=2009-10-23|url=https://people.mozilla.org/~jkew/woff/woff-spec-latest.html|publisher=Mozilla Foundation|access-date=2010-01-30|last2=Leming (Type Supply)|first2=Tal|last3=van Blokland (LettError)|first3=Erik|archive-date=2010-03-09|archive-url=https://web.archive.org/web/20100309062544/http://people.mozilla.org/~jkew/woff/woff-spec-latest.html|url-status=dead}} with reference conversion code written by Jonathan Kew.{{citation|title=WOFF conversion reference code|url=https://people.mozilla.org/~jkew/woff/|access-date=May 8, 2016}} Following the submission of WOFF to the World Wide Web Consortium (W3C) by the Mozilla Foundation, Opera Software and Microsoft in April 2010,[http://www.w3.org/Submission/2010/03/ WOFF File Format 1.0 Submission Request to W3C]{{Citation |url=http://blogs.msdn.com/b/ie/archive/2010/04/23/meet-woff-the-standard-web-font-format.aspx |title=Meet WOFF, The Standard Web Font Format |first=Sylvain |last=Galineau |date=2010-04-23 |publisher=Microsoft|url-status=dead|archive-url=https://web.archive.org/web/20100529104513/http://blogs.msdn.com/b/ie/archive/2010/04/23/meet-woff-the-standard-web-font-format.aspx|archive-date=29 May 2010}} the W3C commented that it expected WOFF to soon become the "single, interoperable {{Bracket|font}} format" supported by all browsers.[http://www.w3.org/Submission/2010/03/Comment/ Team Comment on "WOFF File Format 1.0" Submission] The W3C published WOFF as a working draft in July 2010.{{Citation |url=http://www.h-online.com/open/news/item/WOFF-Now-loading-fonts-on-websites-1047073.html |title=WOFF - Now loading fonts on websites |publisher=The H |date=2010-07-28}}{{Citation |url=http://www.sitepoint.com/blogs/2010/08/17/w3c-backs-the-woff-webfont-standard/ |title=W3C Backs the WOFF WebFont Standard |first=Craig |last=Buckler |date=2010-08-17 |publisher=SitePoint}} The final draft was published as a W3C Recommendation on 13 December 2012.{{Cite web|url=https://www.w3.org/TR/WOFF/Overview.html|title=WOFF File Format 1.0|website=www.w3.org|access-date=2019-08-31}}

WOFF 2.0 significantly improved compression efficiency compared to WOFF 1.0, primarily through the introduction of Brotli, 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,[http://www.w3.org/TR/WOFF2/ W3C: WOFF File Format 2.0] with Google providing the reference implementation.{{citation|url=https://github.com/google/woff2|title=Reference WOFF2 generation code|access-date=May 8, 2016}}

Each version of the format has received the backing of many type foundries.{{Citation |url=http://typegirl.tumblr.com/post/142912558/most-of-the-important-foundries-are-supporting-webfont |title=Most of the important foundries are supporting #webfont |website=Typegirl |first=Tiffany |last=Wardle |date=2009-07-16 |via=tumblr |access-date=2010-02-05}}

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.{{Citation|last1=Kew (Mozilla)|first1=Jonathan|title=WOFF File Format (draft of 2009-10-23)|date=2009-10-23|url=https://people.mozilla.org/~jkew/woff/woff-spec-latest.html|publisher=Mozilla Foundation|access-date=2010-01-30|last2=Leming (Type Supply)|first2=Tal|last3=van Blokland (LettError)|first3=Erik|archive-date=2010-03-09|archive-url=https://web.archive.org/web/20100309062544/http://people.mozilla.org/~jkew/woff/woff-spec-latest.html|url-status=dead}} WOFF Version 1 uses the widely available zlib compression (specifically, the compress2 function), typically resulting in a file size reduction for TrueType files of over 40%.{{Citation |url=http://www.phpied.com/font-face-gzipping-take-ii |title=@font-face gzipping - take II |date=2009-10-20 |publisher=PHPied.com |first=Stoyan |last=Stefanov |access-date=2010-01-30}} Since OpenType CFF files (with PostScript glyph outlines) are already compressed, their reduction is typically smaller.{{Cite web|url=http://blog.typekit.com/2010/12/08/type-rendering-font-outlines-and-file-formats/|title=The Typekit Blog | Type rendering: Font outlines and file formats}}

Browser support

Major web browsers support WOFF:

  • Firefox since version 3.6{{Citation |url=http://blog.mozilla.com/blog/2009/10/20/mozilla-supports-web-open-font-format/ |title=Mozilla Supports Web Open Font Format |last=Shapiro |first=Melissa |date=2009-10-20 |publisher=Mozilla Foundation |access-date=2010-02-05}}
  • Google Chrome since version 6.0{{Citation |url=http://blog.typekit.com/2010/09/21/typekit-adds-chrome-6-woff-support/ |title=Typekit adds Chrome 6 WOFF support |publisher=Typekit |first=Matt |last=Colyer |date=2010-09-21}}
  • Internet Explorer since version 9{{Citation |url=http://blogs.msdn.com/b/ie/archive/2010/06/23/html5-native-third-ie9-platform-preview-available-for-developers.aspx |title=HTML5, Native: Third IE9 Platform Preview Available for Developers |date=2010-06-23 |first=Dean |last=Hachamovitch |author-link=Dean Hachamovitch |publisher=Microsoft}}
  • Konqueror since KDE 4.4.1{{Citation|url=http://websvn.kde.org/?view=revision&revision=1088984|title=KDE SVN Revision 1088984|publisher=KDE Bugzilla|date=2010-02-12|access-date=2011-10-14}}
  • Microsoft Edge
  • Opera since version 11.10{{Citation |url=http://my.opera.com/desktopteam/blog/2011/02/17/a-first-glimpse-at-barracuda |title=A first glimpse at Opera 11.10 "Barracuda" |date=2011-02-17 |publisher=Opera Software |access-date=2011-02-17}} (Presto 2.7.81){{Citation |url=//www.opera.com/docs/specs/presto27/ |title=Web specifications support in Opera Presto 2.7 |publisher=Opera}}
  • Safari{{Citation |url=https://www.apple.com/macosx/whats-new/features.html#safari |title=Safari Features |date=2011-06-06 |publisher=Apple|access-date=2011-10-14}} 5.1{{Citation|url=http://www.filehippo.com/download_safari/changelog/10252/|title=Safari 5.1 Changelog|publisher=FileHippo.com|access-date=2011-10-14}}
  • other WebKit-based browsers since WebKit build 528{{Citation |url=https://bugs.webkit.org/show_bug.cgi?id=38217 |title=Bug 38217 - {{Bracket|chromium}} Add WOFF support |publisher=WebKit}}{{Citation |url=https://bugs.webkit.org/show_bug.cgi?id=31302 |title= Bug 31302 - Add WOFF support for @font-face |publisher=WebKit}}

WOFF 2.0 is supported in:

  • Google Chrome (since version 36),{{Citation |url=//blog.chromium.org/2014/05/chrome-36-beta-elementanimate-html.html |title=Chromium 36 Release Notes |publisher=Google}}
  • Edge (since version 14),{{Citation |url=https://blogs.windows.com/msedgedev/2016/05/03/woff2-fonts-in-microsoft-edge/ |title=Speed up page load with WOFF 2.0 fonts in Microsoft Edge |date=3 May 2016 |publisher=Microsoft}}
  • Opera (since version 26),{{Citation |url=https://dev.opera.com/blog/opera-23/ |title=Opera 26 Release Notes |publisher=Opera Software ASA}}
  • Firefox (since version 35){{Citation |url=https://developer.mozilla.org/en-US/Firefox/Releases/35 |title=Firefox 35 Release Notes |publisher=Mozilla Developer Network}}
  • Safari (since version 10).{{Citation |url=https://developer.apple.com/library/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_0.html |title=What's new in Safari |publisher=Apple}}

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,[https://www.w3.org/TR/css-fonts-3/#font-fetching-requirements CSS Fonts Module Level 3] 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.{{Cite web |url=//www.fontspring.com/support/troubleshooting/webfonts-are-not-loading-in-firefox |title=Webfonts are not loading in Firefox |publisher=Fontspring |access-date=2013-01-01}} Since February 2017, the proper MIME type is font/woff for WOFF 1.0 and font/woff2 for WOFF 2.0. 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.

See also

References

{{Reflist}}