Closed Bug 1634834 Opened 5 years ago Closed 5 years ago

Webfont with 13-character ligature rejected by sanitizer

Categories

(Core :: Layout: Text and Fonts, defect, P3)

77 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: andersk, Assigned: jfkthame)

Details

Attachments

(1 file)

https://andersk.github.io/woff-ligature-test/ (source code) has a webfont with a 13-character ligature. One might assume that a real font would never have a 13-character ligature, but in fact it’s easy to create such a font by accident using webfonts-loader, which automatically generates ligatures from the names of the input SVG files. This showed up in zulip/zulip#14434.

Firefox nightly fails to load the webfont unless gfx.downloadable_fonts.otl_validation is configured to false. It gives these errors in the console:

downloadable font: GSUB: Bad component count of 13 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:0) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff2
downloadable font: GSUB: Failed to parse ligature 0 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:0) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff2
downloadable font: GSUB: Failed to parse ligature set 0 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:0) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff2
downloadable font: Layout: Failed to parse lookup subtable 3 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:0) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff2
downloadable font: Layout: Failed to parse subtable 0 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:0) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff2
downloadable font: Layout: Failed to parse lookup 0 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:0) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff2
downloadable font: GSUB: Failed to parse lookup list table (font-family: "iconfont" style:normal weight:400 stretch:100 src index:0) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff2
downloadable font: GSUB: Failed to parse table (font-family: "iconfont" style:normal weight:400 stretch:100 src index:0) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff2
downloadable font: rejected by sanitizer (font-family: "iconfont" style:normal weight:400 stretch:100 src index:0) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff2
downloadable font: GSUB: Bad component count of 13 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:1) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff
downloadable font: GSUB: Failed to parse ligature 0 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:1) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff
downloadable font: GSUB: Failed to parse ligature set 0 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:1) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff
downloadable font: Layout: Failed to parse lookup subtable 3 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:1) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff
downloadable font: Layout: Failed to parse subtable 0 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:1) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff
downloadable font: Layout: Failed to parse lookup 0 (font-family: "iconfont" style:normal weight:400 stretch:100 src index:1) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff
downloadable font: GSUB: Failed to parse lookup list table (font-family: "iconfont" style:normal weight:400 stretch:100 src index:1) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff
downloadable font: GSUB: Failed to parse table (font-family: "iconfont" style:normal weight:400 stretch:100 src index:1) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff
downloadable font: rejected by sanitizer (font-family: "iconfont" style:normal weight:400 stretch:100 src index:1) source: https://andersk.github.io/woff-ligature-test/built/iconfont.woff

Yeah, looks like this is simply an error in the OTS sanitizer for GSUB tables; I'll post a patch there to fix it. Thanks for reporting!

Severity: -- → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

Upstream pull request filed: https://github.com/khaledhosny/ots/pull/206.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/95797bc3e1b9 Update OTS to upstream commit bbd729f8f39c28db9818371b20f9e5ed44226c2f to fix invalid ligature component count check. r=lsalzman
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: