请输入您要查询的百科知识:

 

词条 Web Open Font Format
释义

  1. Standardization

  2. Specification

  3. Vendor support

  4. See also

  5. References

  6. External links

{{redirect2|WOFF|Woff|the 2016 video game|World of Final Fantasy|a band containing a member named Jim Woff|Crow (Australian band)}}{{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)[1][2]}}
| 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 2 primary goals are to first 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

Version 1 was developed during 2009[3] and became a World Wide Web Consortium (W3C) Recommendation in 2012.[4]

The WOFF specification was written by Jonathan Kew, Tal Leming, and Erik van Blokland,[3] with reference conversion code written by Jonathan Kew.[5] Following the submission of WOFF by the Mozilla Foundation, Opera Software and Microsoft in April 2010,[6][7] the W3C commented that it expected WOFF soon to become the "single, interoperable {{Bracket|font}} format" supported by all browsers.[8] The W3C published WOFF as a working draft in July,[9][10] and it became a W3C Recommendation in December that year.

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]

Specification

WOFF is essentially a wrapper that contains SFNT-based fonts (TrueType or OpenType) that have been compressed using a WOFF-specific encoding tool to enable them to be embedded in a Web page.[3] WOFF Version 1 uses the widely available zlib compression (specifically, the compress2 function),[3] typically resulting in a file size reduction for TrueType files of over 40%.[13] Since OpenType CFF files (with PostScript glyph outlines) are already compressed, their reduction is typically smaller.[14]

Vendor support

Each version of the format has received the backing of many font vendors, also known as foundries[15] and has been supported by all major browsers:

  • Firefox since version 3.6[16]
  • Google Chrome since version 6.0[17]
  • Internet Explorer since version 9[18]
  • Konqueror since KDE 4.4.1[19]
  • Microsoft Edge
  • Opera since version 11.10[20] (Presto 2.7.81)[21]
  • Safari[22] 5.1[23]
  • other WebKit-based browsers since WebKit build 528[24][25]

WOFF 2.0, based on the Brotli compression algorithm and other improvements over WOFF 1.0 giving more than 30% reduction in file size, is supported in

  • Google Chrome (since version 36),[26]
  • Edge (since version 14),[27]
  • Opera (since version 26),[28]
  • Firefox (since version 35)[29]
  • Safari (since version 10).[30]

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,[31] 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.[32] 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]

See also

  • Web typography
  • Embedded OpenType (EOT)

References

1. ^{{cite web |title=Media Types |url=//www.iana.org/assignments/media-types/media-types.xhtml |publisher=IANA |date=2017-10-12 |access-date=2017-10-17 }}
2. ^{{cite web |title=The "font" Top-Level Media Type |rfc=8081 |url=//tools.ietf.org/html/rfc8081 |publisher=IETF |date=February 2017 |access-date=2017-10-17 }}
3. ^{{Citation |url=https://people.mozilla.org/~jkew/woff/woff-spec-latest.html |title=WOFF File Format (draft of 2009-10-23) |first=Jonathan |last=Kew (Mozilla) |first2=Tal |last2=Leming (Type Supply) |first3=Erik |last3=van Blokland (LettError) |date=2009-10-23 |publisher=Mozilla Foundation |accessdate=2010-01-30}}
4. ^WOFF File Format 1.0
5. ^{{citation|url=https://people.mozilla.org/~jkew/woff/|title=WOFF conversion reference code|accessdate=May 8, 2016}}
6. ^WOFF File Format 1.0 Submission Request to W3C
7. ^{{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}}
8. ^Team Comment on "WOFF File Format 1.0" Submission
9. ^{{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}}
10. ^{{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}}
11. ^{{citation|url=https://github.com/google/woff2|title=Reference WOFF2 generation code|accessdate=May 8, 2016}}
12. ^W3C: WOFF File Format 2.0
13. ^{{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 |accessdate=2010-01-30}}
14. ^http://blog.typekit.com/2010/12/08/type-rendering-font-outlines-and-file-formats/
15. ^{{Citation |url=http://typegirl.tumblr.com/post/142912558/most-of-the-important-foundries-are-supporting-webfont |title=Typegirl - Most of the important foundries are supporting #webfont |first=Tiffany |last=Wardle |date=2009-07-16 |publisher=tumblr |accessdate=2010-02-05}}
16. ^{{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 |accessdate=2010-02-05}}
17. ^{{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}}
18. ^{{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 |authorlink=Dean Hachamovitch |publisher=Microsoft}}
19. ^{{Citation|url=http://websvn.kde.org/?view=revision&revision=1088984|title=KDE SVN Revision 1088984|publisher=KDE Bugzilla|date=2010-02-12|accessdate=2011-10-14}}
20. ^{{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 |accessdate=2011-02-17}}
21. ^{{Citation |url=//www.opera.com/docs/specs/presto27/ |title=Web specifications support in Opera Presto 2.7 |publisher=Opera}}
22. ^{{Citation |url=https://www.apple.com/macosx/whats-new/features.html#safari |title=Safari Features |date=2011-06-06 |publisher=Apple|accessdate=2011-10-14}}
23. ^{{Citation|url=http://www.filehippo.com/download_safari/changelog/10252/|title=Safari 5.1 Changelog|publisher=FileHippo.com|accessdate=2011-10-14}}
24. ^{{Citation |url=https://bugs.webkit.org/show_bug.cgi?id=38217 |title=Bug 38217 - {{Bracket|chromium}} Add WOFF support |publisher=WebKit}}
25. ^{{Citation |url=https://bugs.webkit.org/show_bug.cgi?id=31302 |title= Bug 31302 - Add WOFF support for @font-face |publisher=WebKit}}
26. ^{{Citation |url=//blog.chromium.org/2014/05/chrome-36-beta-elementanimate-html.html |title=Chromium 36 Release Notes |publisher=Google}}
27. ^{{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 |publisher=Microsoft}}
28. ^{{Citation |url=https://dev.opera.com/blog/opera-23/ |title=Opera 26 Release Notes |publisher=Opera Software ASA}}
29. ^{{Citation |url=https://developer.mozilla.org/en-US/Firefox/Releases/35 |title=Firefox 35 Release Notes |publisher=Mozilla Developer Network}}
30. ^{{Citation |url=https://developer.apple.com/library/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_0.html |title=What's new in Safari |publisher=Apple}}
31. ^[https://www.w3.org/TR/css-fonts-3/#font-fetching-requirements CSS Fonts Module Level 3]
32. ^{{Cite web |url=//www.fontspring.com/support/troubleshooting/webfonts-are-not-loading-in-firefox |title=Webfonts are not loading in Firefox |publisher=Fontspring |accessdate=2013-01-01}}

External links

  • [https://www.w3.org/TR/WOFF/ Current specification of the WOFF file format] at the World Wide Web Consortium's website
  • [https://www.w3.org/TR/WOFF2/ Current specification of the WOFF 2 file format] at the World Wide Web Consortium's website
{{Typography terms}}{{DEFAULTSORT:Web Typography}}

5 : Digital typography|Font formats|Typesetting|World Wide Web Consortium standards|Computer-related introductions in 2009

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/22 5:23:23