Comparing version 0.0.3 to 0.0.4
@@ -48,2 +48,4 @@ "use strict"; | ||
} | ||
// 兼容 woff2 的解析 | ||
yield woff2.init(); | ||
const unicodeSet = Object.values(codeMap); | ||
@@ -69,5 +71,2 @@ const sourceBuffer = yield fs.promises.readFile(fontpath); | ||
for (let type of outputTypes) { | ||
if (type === 'woff2') { | ||
yield woff2.init(); | ||
} | ||
output[type] = font.write({ type }); | ||
@@ -74,0 +73,0 @@ } |
{ | ||
"name": "fontsub", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "import font file and export .ttf ", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -53,2 +53,5 @@ import fs = require('fs') | ||
// 兼容 woff2 的解析 | ||
await woff2.init() | ||
const unicodeSet = Object.values(codeMap) | ||
@@ -76,5 +79,2 @@ const sourceBuffer = await fs.promises.readFile(fontpath) | ||
for (let type of outputTypes) { | ||
if (type === 'woff2') { | ||
await woff2.init() | ||
} | ||
output[type] = font.write({ type }) | ||
@@ -81,0 +81,0 @@ } |
17003199
20
266