Skip to content

Commit

Permalink
Print glyph count information on build
Browse files Browse the repository at this point in the history
  • Loading branch information
hakatashi committed Oct 21, 2017
1 parent 104768f commit d3379d9
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/generate-svg.ls
Original file line number Diff line number Diff line change
Expand Up @@ -596,15 +596,27 @@ module.exports = (codepoint-infos, config) ->

font-counts-list = Array.from font-counts
font-counts-list.sort (a, b) -> b.1 - a.1
font-counts-text = font-counts-list.map ([font-name, font-count]) ->
font-license-text = font-counts-list.map ([font-name, font-count]) ->
font = font-data[font-name]
"#{font.name} by #{font.author} licensed under #{font.license}"
.join '\n'
font-count-text = font-counts-list.map ([font-name, font-count]) ->
font = font-data[font-name]
"#{font.name}: #{font-count}"
.join '\n'

console.log """
====== License notation ======
#{font-counts-text}
#{font-license-text}
"""

console.log """
====== Glyph count ======
#{font-count-text}
"""

console.log """
Expand Down

0 comments on commit d3379d9

Please sign in to comment.