Closed Bug 1447600 Opened 6 years ago Closed 6 years ago

Support variation-font extensions to OpenType Layout tables in OTS

Categories

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

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: jfkthame, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gfx-noted])

The OTS sanitizer's support for OpenType Layout tables GSUB, GPOS, GDEF (which we currently enable only on non-release channels; on release, these tables are passed through to harfbuzz without validation) does not currently handle extensions to these tables for variation fonts.

As a result, some variation fonts that are in fact valid will only load (on pre-release builds) if gfx.downloadable_fonts.otl_validation is set to false. In particular, this affects the variabletest_box.ttf font used in WPT (tests/css/css-fonts/variations/).

We should extend OTS to handle GSUB and GPOS version 1.1, and GDEF version 1.3, as documented in https://docs.microsoft.com/en-us/typography/opentype/spec/, so that these fonts can be successfully validated.
FTR, I've submitted PRs upstream (https://github.com/khaledhosny/ots/pull/162, https://github.com/khaledhosny/ots/pull/163) that add sufficient variation support to OTS that variabletest_box.ttf no longer fails. (Not yet implemented GDEF v1.3, but the test font doesn't use that format.)
Once this lands, I think the wpt manifest pref setting of gfx.downloadable_fonts.otl_validation:false added in bug 1447163 should be able to be removed.
Whiteboard: [gfx-noted]
This is mostly fixed by the OTS update we landed in bug 1341088 (and the pref setting mentioned in comment 2 is gone).

There is at least one part still outstanding: support for GDEF version 1.3 has not yet been added to OTS. So leaving this bug open until that is completed.
GDEF 1.3 support was included in the OTS updates we landed in bug 1457412. All the example fonts I've seen are successfully handled by the sanitizer, including ones with the new GDEF version.

So at this point I think we can call this fixed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.