diff --git a/package.json b/package.json index 523738b..84fe6a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fonteditor-core", - "version": "0.0.37", + "version": "0.0.40", "description": "fonts (ttf, woff, eot, svg, otf) parse, write, transform. glyph adjust.", "keywords": [ "sfnt", @@ -33,7 +33,7 @@ } ], "scripts": { - "publish": "sh tool/publish-node.sh", + "publish_npm": "sh tool/publish-node.sh", "test": "phantomjs test/run-jasmine.js test/SpecRunner.html", "test_node": "sh tool/test-node.sh", "lint": "fecs ./src --reporter=baidu --rule" diff --git a/src/ttf/ttfreader.js b/src/ttf/ttfreader.js index aa9df8e..be5d266 100644 --- a/src/ttf/ttfreader.js +++ b/src/ttf/ttfreader.js @@ -154,8 +154,11 @@ define( delete ttf.tables; delete ttf.hmtx; delete ttf.loca; - delete ttf.post.nameIndex; - delete ttf.post.names; + if (ttf.post) { + delete ttf.post.nameIndex; + delete ttf.post.names; + } + delete ttf.subsetMap; // 不携带hinting信息则删除hint相关表