Closed Bug 1064737 Opened 9 years ago Closed 9 years ago

support WOFF2 fonts via @font-face


(Core :: Layout: Text and Fonts, enhancement)

Not set



Tracking Status
relnote-firefox --- 35+


(Reporter: jfkthame, Assigned: jfkthame)



(Keywords: dev-doc-complete)


(4 files)

See for current Editor's Draft of the spec.

WOFF2 offers tighter compression than WOFF 1.0, leading to faster load times for pages that use webfonts.

To use this, we'll need to build OTS with WOFF2 enabled in gfx/ots/src/, and support the WOFF2 format hint in nsUserFontSet. And in order to build OTS with WOFF2 support, we'll need to add the Brotli decoder to our build.

See for Brotli source; also present in
Hmm -- looks like as of now, at least, the Brotli source in is not fully up-to-date with the upstream code.

We should import Brotli directly from Google's reference repository, separately from importing OTS from Khaled's github repo.
Severity: normal → enhancement
Depends on: 1066160
This includes WOFF2 support in our build of OTS. (I'll approach Khaled about upstreaming the added OTS_API annotation and a better way to handle the #include path, so we don't have to maintain long-term local patches for these issues.)
Attachment #8488093 - Flags: review?(jdaggett)
Assignee: nobody → jfkthame
WOFF2 support in gfx, under the control of a new pref "gfx.downloadable_fonts.woff2.enabled". Initially this defaults to false for release builds, true for nightlies.
Attachment #8488096 - Flags: review?(jdaggett)
Attachment #8488098 - Flags: review?(jdaggett)
Tryserver build with bug 1066160 and the patches here:
Attachment #8488093 - Flags: review?(jdaggett) → review+
Attachment #8488096 - Flags: review?(jdaggett) → review+
Attachment #8488097 - Flags: review?(jdaggett) → review+
Attachment #8488098 - Flags: review?(jdaggett) → review+
Keywords: dev-doc-needed
Added information (mostly compat info) to:


Release Note Request (optional, but appreciated)
[Why is this notable]: New font format supported, Web compat (Chromium support it)
[Suggested wording]: WOFF2 fonts are now supported.
[Links (documentation, blog post, etc)]:
Note that woff2 support is behind a runtime pref; it's currently enabled for prerelease (nightly/aurora) builds, but will default to disabled on release channels.

The intention is, of course, to enable this by default, but we may wish to do further security review and testing before that happens. So it's unclear to me at this point what Firefox version will ship with WOFF2 enabled by default on Release.

ni? :teoli (to consider how this status should be reflected in the documentation mentioned above).
Flags: needinfo?(jypenator)
Oh, thanks Jonathan I missed that point. Fixed.

By the way, when a bug about activating WOFF2 in release is created, please add dev-doc-needed to it so that we know to update the doc about it when it lands (we de-emphasize the versions where it is supported behind a pref only) :-)
Flags: needinfo?(jypenator)
Blocks: 1084026
Have added this to Aurora notes for 35/36 while it's awaiting a move to release.
You need to log in before you can comment on or make changes to this bug.