Pomax / lib-font

This library adds a new Font() object to the JavaScript toolbox, similar to new Image() for images
MIT License
734 stars 72 forks source link

Fix undefined error when attempting to load something that is not a font #95

Closed pascalw closed 3 years ago

pascalw commented 3 years ago

Hi @Pomax I ran into this small issue. Great to see there's now a test suite as well!

Fixes https://github.com/Pomax/Font.js/issues/63.

Pomax commented 3 years ago

Hm, this is odd. @RoelN and I landed some code before that was supposed to already address this, which is why https://github.com/Pomax/Font.js/blob/master/Font.js#L7-L21 has consts for known and known-illegal file types...

Pomax commented 3 years ago

superceded by https://github.com/Pomax/Font.js/pull/97