Skip to content

Commit

Permalink
feat: Add arm64 linux compatibility (#89)
Browse files Browse the repository at this point in the history
* feat: Add arm64 linux compatibility
* chore: Update deps
* chore: Update msdfgen.linux binary to newest version

---------

Co-authored-by: Leo Bergman <[email protected]>
  • Loading branch information
tkwiatek and lbergman authored Jun 4, 2023
1 parent 986b9cc commit 0cb2817
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 70 deletions.
Binary file modified bin/linux/msdfgen.linux
Binary file not shown.
Binary file added bin/linux_arm64/msdfgen.linux
Binary file not shown.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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');
Expand Down
81 changes: 29 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}

0 comments on commit 0cb2817

Please sign in to comment.