Skip to content

Commit

Permalink
chore: advance init woff2 webassembly
Browse files Browse the repository at this point in the history
  • Loading branch information
Lete114 committed Jan 12, 2024
1 parent 103e52f commit 8250f7d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ export interface IOptions {
writeOptions: FontWriteOptionsWithoutSVG // only support font type: ttf | woff | woff2 | eot
}

export default async function minify(options: IOptions) {
if ([options.readOptions.type, options.writeOptions.type].includes('woff2')) {
await woff2.init()
}
// init woff2 webassembly
woff2.init()

export default async function minify(options: IOptions) {
const unique = uniqueString(options.text)
const unicodes = stringToUnicodeNumbers(unique)

Expand Down

0 comments on commit 8250f7d

Please sign in to comment.