Closed Bug 1446024 Opened 2 years ago Closed 2 years ago

Microsoft "Variable Fonts" demo's fonts won't load unless you toggle gfx.downloadable_fonts.otl_validation=false

Categories

(Core :: Graphics: Text, defect, P3)

57 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1341088

People

(Reporter: dholbert, Unassigned)

References

()

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

(This might morph into a Tech Evang bug if it turns out we should ask Microsoft to fix their fonts here -- not sure. Starting out in Graphics:Text for initial investigation)

STR:
1. Enable these prefs in about:config:
 gfx.downloadable_fonts.keep_variation_tables
 layout.css.font-variations.enabled
(And maybe restart Firefox? I forget if that's necessary)

2. Open https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts/

3. Look at your Browser Console (Ctrl Shift J, on linux)


ACTUAL RESULTS:
A whole bunch of errors reported for the variable fonts:
downloadable font: Layout: bad delta format: 32768 (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: GPOS: Failed to parse device table in value record (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: GPOS: Failed to parse value record in format 1 pair set table (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: GPOS: Failed to parse pair set table 2 (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: GPOS: Failed to parse pair pos format 1 (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: Layout: Failed to parse lookup subtable 1 (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: Layout: Failed to parse subtable 0 (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: Layout: Failed to parse lookup 1 (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: GPOS: Failed to parse lookup list table (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: GPOS: Failed to parse table (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: rejected by sanitizer (font-family: "Variable Bahnschrift" style:normal weight:normal stretch:normal src index:1) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
downloadable font: Layout: bad delta format: 32768 (font-family: "Variable Sitka" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Sitka.ttf
downloadable font: GPOS: Failed to parse device table in anchor table (font-family: "Variable Sitka" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Sitka.ttf
downloadable font: GPOS: Faled to parse anchor table for mark table 0 (font-family: "Variable Sitka" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Sitka.ttf
downloadable font: GPOS: Failed to parse mark array (font-family: "Variable Sitka" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Sitka.ttf
downloadable font: Layout: Failed to parse lookup subtable 3 (font-family: "Variable Sitka" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Sitka.ttf
downloadable font: Layout: Failed to parse subtable 0 (font-family: "Variable Sitka" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Sitka.ttf
downloadable font: Layout: Failed to parse lookup 0 (font-family: "Variable Sitka" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Sitka.ttf
downloadable font: GPOS: Failed to parse lookup list table (font-family: "Variable Sitka" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Sitka.ttf
downloadable font: GPOS: Failed to parse table (font-family: "Variable Sitka" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Sitka.ttf
downloadable font: rejected by sanitizer (font-family: "Variable Sitka" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Sitka.ttf
downloadable font: Layout: bad delta format: 32768 (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf
downloadable font: GPOS: Failed to parse device table in value record (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf
downloadable font: GPOS: Failed to parse value record in format 1 pair set table (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf
downloadable font: GPOS: Failed to parse pair set table 0 (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf
downloadable font: GPOS: Failed to parse pair pos format 1 (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf
downloadable font: Layout: Failed to parse lookup subtable 1 (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf
downloadable font: Layout: Failed to parse subtable 0 (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf
downloadable font: Layout: Failed to parse lookup 0 (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf
downloadable font: GPOS: Failed to parse lookup list table (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf
downloadable font: GPOS: Failed to parse table (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf
downloadable font: rejected by sanitizer (font-family: "Decovar" style:normal weight:normal stretch:normal src index:0) source: https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/DecovarAlpha-VF.ttf


Notably, "Bahnschrift" is the font used for the title, so the title ends up using a fallback font by default, because its font was rejected.


EXPECTED RESULTS:
Ideally, we'd be able to render all of the fonts. :)

We seem to do better if I set gfx.downloadable_fonts.otl_validation=false (then the title text renders in the provided Bahnschrift font, for example).
(Here's the error output from comment 0, as a text file for easier reading)
Flags: needinfo?(jfkthame)
Looks like this is a new feature in the OpenType spec that is not yet supported by the GPOS code in OTS: in variation fonts, Device tables are replaced by VariationIndex tables, which use a new DeltaFormat values that OTS rejects.

gfx.downloadable_fonts.otl_validation=false is a reasonable workaround for now (and is the default setting on release channels, so this won't affect release users anyway, only nightly/dev-edition users).
Flags: needinfo?(jfkthame)
Whiteboard: [gfx-noted]
I believe this is no longer a problem, since the OTS update in bug 1341088. Daniel, could you confirm that the MS demo fonts now load even without toggling the otl_validation pref?
Flags: needinfo?(dholbert)
In a fresh profile*, I don't see any warnings when loading the Microsoft demo page from comment 0 (on Linux).

And I believe the Bahnschrift font is being successfully used - devtools "Fonts" panel says for the page title:
> Bahnschrift
> 
> https://az813057.vo.msecnd.net/testdrive/var-fonts/fonts/Bahnschrift.ttf
> 
> @font-face {
>   font-family: "Variable Bahnschrift";
>   src: local("Bahnschrift"), url("fonts/Bahnschrift.ttf") format("truetype");
> }


* I didn't flip any prefs, because the prefs from comment 0 seem to no longer exist. Let me know if I should be flipping any prefs at all (in a fresh profile) before testing.
Flags: needinfo?(dholbert) → needinfo?(jfkthame)
(Oh, sorry -- layout.css.font-variations.enabled does still exist, but it just defaults to true now, so I didn't need to flip it.)
Right, this is expected to work with default prefs on Nightly now.

Resolving as a dupe of bug 1341088, which is what fixed the validation failure for these fonts.
Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(jfkthame)
Resolution: --- → DUPLICATE
Duplicate of bug: 1341088
You need to log in before you can comment on or make changes to this bug.