Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese fonts failing with various errors #1901

Closed
dhowe opened this issue Apr 18, 2017 · 6 comments
Closed

Chinese fonts failing with various errors #1901

dhowe opened this issue Apr 18, 2017 · 6 comments

Comments

@dhowe
Copy link
Contributor

dhowe commented Apr 18, 2017

At very least these should be caught and a friendly(er) error message provided

p5.js:13 Uncaught Error: Only format 4 cmap tables are supported.
    at Object.exports.argument (p5.js:13)
    at Object.parseCmapTable [as parse] (p5.js:2778)
    at parseBuffer (p5.js:1051)
    at p5.js:1154
    at XMLHttpRequest.request.onload (p5.js:1000)



p5.js:243 Uncaught TypeError: Cannot read property 'glyphIndexMap' of null
    at Object.addGlyphNames (p5.js:243)
    at parseBuffer (p5.js:1121)
    at p5.js:1154
    at XMLHttpRequest.request.onload (p5.js:1000)

@limzykenneth
Copy link
Member

@dhowe Just got around to testing this. I've tested a few Chinese fonts from both Adobe and independent foundries and it works as expected with no errors. Do you have a sample of the font that is throwing the errors? I would like to have a test and perhaps a closer look at it.

@dhowe
Copy link
Contributor Author

dhowe commented Jun 12, 2018

unfortunately i don't have the font any longer -- lets keep an eye on this though (also relates to #3012)

however, i would still argue for wrapping the code above in try/catch at least (since we know that improperly formatted fonts will fail), and then outputting a more friendly error msg

@limzykenneth
Copy link
Member

@dhowe catching the error and throw a better error message seems a good way forward for me, but let's continue on #3012

@TanviKumar
Copy link
Member

What is the status of this issue currently?

@limzykenneth
Copy link
Member

@TanviKumar Can't reproduce probably. Can be closed in my opinion.

@dhowe
Copy link
Contributor Author

dhowe commented Dec 17, 2018

Closing this until/unless we find another case

@dhowe dhowe closed this as completed Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants