New issue
Advanced search Search tips

Issue 601240 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Compat



Sign in to add a comment

OTS parsing error on WOFF2 font

Reported by ch...@chrislewis.codes, Apr 6 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36

Example URL:
http://origin.fontbureau.com/mbhinted/test.html

Steps to reproduce the problem:
Visit http://origin.fontbureau.com/mbhinted/test.html

What is the expected behavior?
All three lines should display using Miller Banner font.

What went wrong?
WOFF2 font does not render, falling back to Comic Sans. Console shows "Failed to decode downloaded font ... OTS parsing error: Failed to convert WOFF 2.0 font to SFNT"

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? Yes Chrome 48

Does this work in other browsers? Yes 

Chrome version: 49.0.2623.110  Channel: stable
OS Version: OS X 10.11.3
Flash Version: Shockwave Flash 21.0 r0

This same font works in Firefox, and also worked in earlier Chrome versions. This seems to be a regression in Chrome 49.
 
chrome48.png
148 KB View Download
chrome49.png
161 KB View Download
Components: Blink>WebFonts
Status: Untriaged (was: Unconfirmed)
I can see the same errors in 49 and trunk.
I tried to find suspicious library rolls between 48 and 49.

We didn't have any for ots and woff2, but have two rolls on brotli.
0afd45eda8395d5b8851ab4b63f17528b9895c99
f9a29fdb5041606057668f7a900f6c08ae6d51cb

One of them could be a root cause. Let me check them.

Comment 3 by bashi@chromium.org, Apr 8 2016

FYI

It seems that OTS failed to reconstruct glyf table (Haven't took a closer look).

https://code.google.com/p/chromium/codesearch#chromium/src/third_party/woff2/src/woff2_dec.cc&l=1046

Labels: -OS-Mac OS-All
v48.*
0afd45eda8395d5b8851ab4b63f17528b9895c99~(r352584) -> good
0afd45eda8395d5b8851ab4b63f17528b9895c99 (r352585) -> good
f9a29fdb5041606057668f7a900f6c08ae6d51cb~(r358537) -> good
f9a29fdb5041606057668f7a900f6c08ae6d51cb (r358538) -> good

Hum.... it works even after both rolls.

v49.*
92d77538a86529ca35f9220bd3cd512cbea1f086 (r369907) -> bad

I'd run bisect between r358538:r369907 in the next week.
Still have 10k+ changes in the range :(
Ah, I find one woff2 roll in this range.
00bf9f42d67dbda08ba99ca7e4b529ed4d77dbdb

I'll try this next.
00bf9f42d67dbda08ba99ca7e4b529ed4d77dbdb~(r362355) -> good
00bf9f42d67dbda08ba99ca7e4b529ed4d77dbdb (r362356) -> good

And, find one OTS roll, too... Sorry, my first checks in #2 was wrong.
09ca5a049238a26a9ec4aa8de66850d7e6475107 (r362382)
Owner: toyoshim@chromium.org
Status: Assigned (was: Untriaged)
09ca5a049238a26a9ec4aa8de66850d7e6475107~(r362381) -> good
09ca5a049238a26a9ec4aa8de66850d7e6475107 (r362382) -> bad

So, this roll caused the issue.
I'll check woff2 side.

Tentatively assigned to me for further triage.
oops, s/woff2/ots/
IIUC, this OTS roll also makes third_part/ots use third_party/woff2?
I checked out woff2 with the same revision, b2e7af9f6fbc03ae1926717caa161e1de70c1f95, and tried to decode the woff2 with woff2_decompress.

% ./woff2_decompress Miller-Banner_Roman.hinted.woff2
Processing Miller-Banner_Roman.hinted.woff2 => Miller-Banner_Roman.hinted.ttf
Decompression failed

The latest woff2 can decode this, so probably I can fix this by another woff2 roll.
https://github.com/google/woff2/commit/b220918cab71fba905eb8b076a8bbcf982a60b3a

This change fixes the issue. I'll try updating chromium's woff2.
Thanks for the investigation.

FYI, woff2 HEAD may not compile on Chromium Win due to signed/unsigned comparison:
https://github.com/google/woff2/pull/46
Status: Started (was: Assigned)
Thank you for inputs.
Sigh... actually there are another warning in the latest HEAD, and probably we need a '-Wno-*' flag tentatively.

Anyway, I confirm that chromium master + woff2 HEAD can fix the issue.
Project Member

Comment 13 by bugdroid1@chromium.org, Apr 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/116d7b0ac70c354ee5f863afe616ea8588a1d48c

commit 116d7b0ac70c354ee5f863afe616ea8588a1d48c
Author: toyoshim <toyoshim@chromium.org>
Date: Tue Apr 12 10:19:21 2016

Update woff2 to 4e698b8

This will fix an OTS parsing error case on WOFF2 font.

BUG= 601240 

Review URL: https://codereview.chromium.org/1873123002

Cr-Commit-Position: refs/heads/master@{#386643}

[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/BUILD.gn
[add] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/CONTRIBUTING.md
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/Makefile
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/README.chromium
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/README.md
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/file.h
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/font.cc
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/font.h
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/glyph.cc
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/port.h
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/store_bytes.h
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/table_tags.h
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/transform.cc
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/transform.h
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/woff2_common.cc
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/woff2_common.h
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/woff2_compress.cc
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/woff2_dec.cc
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/woff2_dec.h
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/woff2_decompress.cc
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/woff2_enc.cc
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/woff2_enc.h
[add] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/woff2_out.cc
[add] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/src/woff2_out.h
[modify] https://crrev.com/116d7b0ac70c354ee5f863afe616ea8588a1d48c/third_party/woff2/woff2.gyp

Status: Fixed (was: Started)
The problem should be fixed at trunk.

Chris, can you confirm the original is fixed on Canary channel if possible?
The fix should appear after a few days.

Thanks,
Tested the original example URL in Canary and I can confirm that it is fixed. Thank you!
Status: Verified (was: Fixed)
Thank you for your report.

Sign in to add a comment