[meta] Support OpenType Font Variations (Variable fonts)
Categories
(Core :: Layout: Text and Fonts, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
relnote-firefox | --- | 62+ |
People
(Reporter: contact, Unassigned)
References
(Depends on 5 open bugs, Blocks 1 open bug)
Details
(Keywords: DevAdvocacy, feature, meta, Whiteboard: [behind pref "layout.css.font-variations.enabled"])
Comment 1•9 years ago
|
||
Updated•9 years ago
|
Comment 2•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Comment 3•8 years ago
|
||
Comment 5•8 years ago
|
||
Updated•8 years ago
|
Updated•7 years ago
|
Comment 6•7 years ago
|
||
Updated•7 years ago
|
Updated•6 years ago
|
Forgive me if it's already been covered:
I'm building out a new site, and found that WOFF2 variable fonts in OTF flavors work fine in Webkit browsers, but not in Gecko/Firefox, with no errors given. Luckily there are TTF flavors for the same family, but know this may not be the case going forward.
Is this a known bug?
Comment 10•4 years ago
|
||
I've also encountered the same problem that @kkaufmann mentioned above: Firefox doesn't seem to support OTF flavours of WOFF2 variable fonts, although they work fine in Chrome/Edge.
For example (in case anyone wants to reproduce this): the Source Sans 3.046 font here:
https://github.com/adobe-fonts/source-sans/releases
This font family includes variable WOFF2 fonts in both TTF and OTF flavours, using these file names:
- SourceSans3VF-Roman.ttf.woff2 → TTF
- SourceSans3VF-Roman.otf.woff2 → OTF
If I use the TTF version, it loads correctly in Firefox. But if I use the OTF version, it does not load correctly in Firefox. Firefox instead falls back to the next font family defined in the font-family CSS property for the respective web page text.
Fortunately with this particular font family, both versions are provided. But it's certain to be the case that other font designers might only provide an OTF version of a WOFF2 variable font, and not a TTF version.
FYI, I'm using 64-bit Firefox 92 on Windows 10.
Any chance this can be fixed/improved?
Comment 11•4 years ago
|
||
I think this is essentially a Windows limitation: the DirectWrite font system does not fully support CFF2 fonts. (Note that some of the Adobe font releases have an explicit warning about this, e.g. see https://github.com/adobe-fonts/source-han-sans/releases/tag/2.004R. Perhaps this should be included on all their font release pages; it seems a bit haphazard at the moment.)
Blink-based browsers like Chrome work around this by including a copy of FreeType built in to the browser, and using this instead of DirectWrite to render such fonts. Of course, this doesn't come for free; there's a code size and maintenance cost to consider.
Doing the same thing in Firefox would be bug 1403299.
Comment 12•4 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #11)
Thanks for explaining that! Do you think it's likely that FreeType will ever get added to Firefox in the future? It looks like bug 1403299 has been sitting dormant for the past few years. ;)
Updated•3 years ago
|
Description
•