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

Upgrade canvas dependency to v2.6.1 - This fixes incompatibility with recent versions of node #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function generateBMFont (fontPath, opt, callback) {
if (font.outlinesFormat !== 'truetype') {
throw new TypeError('must specify a truetype font');
}
const canvas = new Canvas(textureWidth, textureHeight);
const canvas = Canvas.createCanvas(textureWidth, textureHeight);
const context = canvas.getContext('2d');
const packer = new MultiBinPacker(textureWidth, textureHeight, texturePadding);
const chars = [];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"license": "MIT",
"dependencies": {
"canvas": "^1.4.0",
"canvas": "^2.6.1",
"map-limit": "0.0.1",
"multi-bin-packer": "^1.1.3",
"opentype.js": "^0.6.4"
Expand Down