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

Throws errors if the font isn't found #112

Closed
tmcw opened this issue Jul 22, 2016 · 1 comment
Closed

Throws errors if the font isn't found #112

tmcw opened this issue Jul 22, 2016 · 1 comment

Comments

@tmcw
Copy link
Contributor

tmcw commented Jul 22, 2016

fontnik.load will throw an error if the given font can't be found or loaded. Instead, it should call the callback with an error argument.

@mikemorris
Copy link
Contributor

If a font can't be found or loaded, the error should be handled externally, in an fs.readFile callback for example, before passing a buffer on to fontnik.load.

The callback is currently called with an error argument if fontnik.load fails because of an invalid font buffer (a malformed upload or simply new Buffer(0) for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants