We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey, firstly I love this build and have managed to deploy it to Heroku!
I was looking at adding web fonts support and have been looking at the registerFont utility method. However if I tweak the code from:
const Canvas = require('canvas'); ........ this.canvas = new Canvas(this.width, this.height);
const Canvas = require('canvas');
........
this.canvas = new Canvas(this.width, this.height);
To either:
const Canvas = require('canvas'); ........ this.canvas = Canvas.createCanvas(this.width, this.height);
this.canvas = Canvas.createCanvas(this.width, this.height);
or:
const { createCanvas } = require('canvas'); ........ this.canvas = createCanvas(this.width, this.height);
const { createCanvas } = require('canvas');
this.canvas = createCanvas(this.width, this.height);
I get an error telling me that createCanvas is not a function, the same if I add registerFont.
I'm using canvas 2.6.0 and node 11.8.0, any ideas?
Thanks,
Dan
The text was updated successfully, but these errors were encountered:
Any luck? I faced the same issue!
Sorry, something went wrong.
Hi @GingerDragon7,
Unfortunately not, I gave up and ended up using Arial (-_-). If you find a way around this keep me posted!
Hi @GingerDragon7, Unfortunately not, I gave up and ended up using Arial (-_-). If you find a way around this keep me posted! Thanks, Dan
https://github.com/Automattic/node-canvas/#registerfont
No branches or pull requests
Hey, firstly I love this build and have managed to deploy it to Heroku!
I was looking at adding web fonts support and have been looking at the registerFont utility method. However if I tweak the code from:
const Canvas = require('canvas');
........
this.canvas = new Canvas(this.width, this.height);
To either:
const Canvas = require('canvas');
........
this.canvas = Canvas.createCanvas(this.width, this.height);
or:
const { createCanvas } = require('canvas');
........
this.canvas = createCanvas(this.width, this.height);
I get an error telling me that createCanvas is not a function, the same if I add registerFont.
I'm using canvas 2.6.0 and node 11.8.0, any ideas?
Thanks,
Dan
The text was updated successfully, but these errors were encountered: