We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44bd096 commit 3002ef8Copy full SHA for 3002ef8
gen_metrics.js
@@ -0,0 +1,10 @@
1
+const opentype = require('opentype.js');
2
+
3
+opentype.load(process.argv[2], function (err, font) {
4
+ var codes = {}
5
6
+ for(let i = 32; i < 257; i++) {
7
+ codes[i] = font.getAdvanceWidth(String.fromCharCode(i), 1000)
8
+ }
9
+ console.log(JSON.stringify(codes))
10
+})
0 commit comments