diff --git a/bin/linux/msdfgen.linux b/bin/linux/msdfgen.linux index ce00f88..eee5196 100755 Binary files a/bin/linux/msdfgen.linux and b/bin/linux/msdfgen.linux differ diff --git a/bin/linux_arm64/msdfgen.linux b/bin/linux_arm64/msdfgen.linux new file mode 100755 index 0000000..1d2d715 Binary files /dev/null and b/bin/linux_arm64/msdfgen.linux differ diff --git a/index.js b/index.js index 0726e24..af3dac3 100644 --- a/index.js +++ b/index.js @@ -18,7 +18,8 @@ const controlChars = ['\n', '\r', '\t']; const binaryLookup = { darwin: 'msdfgen.osx', win32: 'msdfgen.exe', - linux: 'msdfgen.linux' + linux: 'msdfgen.linux', + linux_arm64: 'msdfgen.linux' }; module.exports = generateBMFont; @@ -51,7 +52,7 @@ function generateBMFont (fontPath, opt, callback) { opt = {}; } - const binName = binaryLookup[process.platform]; + const binName = process.arch === "arm64" ? binaryLookup[`${process.platform}_${process.arch}`] : binaryLookup[process.platform]; assert.ok(binName, `No msdfgen binary for platform ${process.platform}.`); assert.ok(fontPath, 'must specify a font path'); diff --git a/package-lock.json b/package-lock.json index 72f16dd..47cbe43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,14 +10,14 @@ "license": "MIT", "dependencies": { "arabic-persian-reshaper": "^1.0.1", - "cli-progress": "^3.10.0", - "commander": "^2.19.0", - "handlebars": "^4.7.2", + "cli-progress": "^3.12.0", + "commander": "^2.20.3", + "handlebars": "^4.7.7", "is-invalid-path": "^1.0.2", - "jimp": "^0.3.5", - "js2xmlparser": "^4.0.0", + "jimp": "^0.3.11", + "js2xmlparser": "^4.0.2", "map-limit": "0.0.1", - "maxrects-packer": "^2.4.0-alpha.0", + "maxrects-packer": "^2.7.3", "opentype.js": "^0.11.0", "update-notifier": "^5.1.0" }, @@ -26,15 +26,15 @@ }, "devDependencies": { "cz-conventional-changelog": "^2.1.0", - "load-bmfont": "^1.4.0", - "open": "^6.3.0", - "rimraf": "^2.6.3", - "run-parallel": "^1.1.9", - "serve-handler": "^6.0.2", - "standard-version": "^9.3.2", - "tslint": "^5.14.0", - "typescript": "^3.3.3333", - "xml2js": "^0.4.19" + "load-bmfont": "^1.4.1", + "open": "^6.4.0", + "rimraf": "^2.7.1", + "run-parallel": "^1.2.0", + "serve-handler": "^6.1.5", + "standard-version": "^9.5.0", + "tslint": "^5.20.1", + "typescript": "^3.9.10", + "xml2js": "^0.4.23" } }, "node_modules/@babel/code-frame": { @@ -866,9 +866,9 @@ } }, "node_modules/cli-progress": { - "version": "3.11.2", - "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.11.2.tgz", - "integrity": "sha512-lCPoS6ncgX4+rJu5bS3F/iCz17kZ9MPZ6dpuTtI0KXKABkhyXIdYB3Inby1OpaGti3YlI3EeEkM9AuWpelJrVA==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.12.0.tgz", + "integrity": "sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A==", "dependencies": { "string-width": "^4.2.3" }, @@ -3345,33 +3345,21 @@ } }, "node_modules/serve-handler": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", - "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz", + "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==", "dev": true, "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", "fast-url-parser": "1.1.3", "mime-types": "2.1.18", - "minimatch": "3.0.4", + "minimatch": "3.1.2", "path-is-inside": "1.0.2", "path-to-regexp": "2.2.1", "range-parser": "1.2.0" } }, - "node_modules/serve-handler/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -4687,9 +4675,9 @@ "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==" }, "cli-progress": { - "version": "3.11.2", - "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.11.2.tgz", - "integrity": "sha512-lCPoS6ncgX4+rJu5bS3F/iCz17kZ9MPZ6dpuTtI0KXKABkhyXIdYB3Inby1OpaGti3YlI3EeEkM9AuWpelJrVA==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.12.0.tgz", + "integrity": "sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A==", "requires": { "string-width": "^4.2.3" } @@ -6583,30 +6571,19 @@ } }, "serve-handler": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", - "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz", + "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==", "dev": true, "requires": { "bytes": "3.0.0", "content-disposition": "0.5.2", "fast-url-parser": "1.1.3", "mime-types": "2.1.18", - "minimatch": "3.0.4", + "minimatch": "3.1.2", "path-is-inside": "1.0.2", "path-to-regexp": "2.2.1", "range-parser": "1.2.0" - }, - "dependencies": { - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } } }, "signal-exit": { diff --git a/package.json b/package.json index 869eee7..d859a63 100644 --- a/package.json +++ b/package.json @@ -48,32 +48,32 @@ "license": "MIT", "dependencies": { "arabic-persian-reshaper": "^1.0.1", - "cli-progress": "^3.10.0", - "commander": "^2.19.0", - "handlebars": "^4.7.2", + "cli-progress": "^3.12.0", + "commander": "^2.20.3", + "handlebars": "^4.7.7", "is-invalid-path": "^1.0.2", - "jimp": "^0.3.5", - "js2xmlparser": "^4.0.0", + "jimp": "^0.3.11", + "js2xmlparser": "^4.0.2", "map-limit": "0.0.1", - "maxrects-packer": "^2.4.0-alpha.0", + "maxrects-packer": "^2.7.3", "opentype.js": "^0.11.0", "update-notifier": "^5.1.0" }, "devDependencies": { "cz-conventional-changelog": "^2.1.0", - "load-bmfont": "^1.4.0", - "open": "^6.3.0", - "rimraf": "^2.6.3", - "run-parallel": "^1.1.9", - "serve-handler": "^6.0.2", - "standard-version": "^9.3.2", - "tslint": "^5.14.0", - "typescript": "^3.3.3333", - "xml2js": "^0.4.19" + "load-bmfont": "^1.4.1", + "open": "^6.4.0", + "rimraf": "^2.7.1", + "run-parallel": "^1.2.0", + "serve-handler": "^6.1.5", + "standard-version": "^9.5.0", + "tslint": "^5.20.1", + "typescript": "^3.9.10", + "xml2js": "^0.4.23" }, "config": { "commitizen": { "path": "cz-conventional-changelog" } } -} +} \ No newline at end of file