New issue
Advanced search Search tips

Issue 842090 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 3
Type: Feature



Sign in to add a comment

Access OTS errors from JavaScript

Reported by r...@zxql3000.net, May 11 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 OPR/52.0.2871.99

Steps to reproduce the problem:
1. Use a font which will trigger an OTS error 
2. Console gets the OTS messages (e.g. "OTS parsing error: cmap: Failed to parse table")
3. JavaScript is not aware of this problem

What is the expected behavior?
It would be great to catch this error with JavaScript so you can respond to it.

What went wrong?
There is no way (that I know of) to catch this error from JavaScript and respond to it

Did this work before? N/A 

Chrome version: 65.0.3325.181  Channel: n/a
OS Version: OS X 10.13.3
Flash Version:
 
Labels: Needs-Milestone
Cc: rbasuvula@chromium.org
Labels: Needs-Feedback
@roel: Could you please provide us any sample JS / html file to triage the issue from test team end, Which would help us to triage the issue further.

Thank You!

Comment 3 by r...@zxql3000.net, May 18 2018

Attached is a simple page with "Lato Broken", a font that's missing the name table, thus triggering an OTS error.
lato-broken-issue-842090.zip
48.5 KB Download
Project Member

Comment 4 by sheriffbot@chromium.org, May 18 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Blink Blink>Fonts
Labels: -Type-Bug Type-Feature
Font parsing in not visible to JavaScript, so it's not clear to me how this would work.

Comment 6 by woxxom@gmail.com, May 18 2018

What about firing a non-bubbled DOM 'error' event on the LINK or STYLE element with the corresponding font-face CSS?

Comment 7 by woxxom@gmail.com, May 18 2018

Er, abusing 'error' may break some existing code though.

Comment 8 by e...@chromium.org, May 18 2018

Components: Platform>DevTools
Labels: -Pri-2 OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Windows Pri-3
Status: Available (was: Unconfirmed)
Great suggestion but non-trivial to implement. There might be other reporting APIS that we could use to surface these kind of errors.
cc:ing the devtools team to see if they have any ideas.

Components: -Platform>DevTools

Sign in to add a comment