Skip to content

Commit

Permalink
o
Browse files Browse the repository at this point in the history
  • Loading branch information
bung87 committed Jun 26, 2020
1 parent ff333d8 commit 1120c20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/headless.ls
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export collect = (entry,fontName,scrollElement) ->>

export extractor = (config) ->>
textArray = await collect(config.entry,config.fname,config.ss)
transFont = extract(config,config.preserved.concat textArray)
words = config.preserved.concat textArray
transFont = extract(config,words)
mkdirp.sync(path.dirname(config.output))
transFont.output path: config.output
5 changes: 3 additions & 2 deletions src/index.ls
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ getAllText = (config) ->>
export extractor = (config) ->>
start = performance.now()
textArray = await getAllText(config)
transFont = extract(config,config.preserved.concat textArray)
words = config.preserved.concat textArray
transFont = extract(config,words)
mkdirp.sync(path.dirname(config.output))
transFont.output path: config.output
dur = performance.now() - start
glyph = Object.keys(transFont.allGlyph()).length
console.log "glyph size:#{glyph} collected size:#{textArray.length}\n #{textArray} \nextraction takes:#{dur} milliseconds."
console.log "glyph size:#{glyph} collected size:#{words.length}\n #{words} \nextraction takes:#{dur} milliseconds."


0 comments on commit 1120c20

Please sign in to comment.