diff --git a/README.md b/README.md index 29d684f..344bc40 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,22 @@ Default: basename of file Function that takes path of file and return name of icon. +### ligature + +Type: `boolean` +
+Default: `false` + +Whether ligature function will be used or not. + +### ligatureName + +Type: `function(string) -> string` +
+Default: basename of file + +Function that takes name of file and return ligature for that icon. + ### startCodepoint Type: `number` diff --git a/src/generateFonts.js b/src/generateFonts.js index 33723c1..e8fa402 100644 --- a/src/generateFonts.js +++ b/src/generateFonts.js @@ -44,14 +44,17 @@ var generators = { _.each(options.files, function(file, idx) { var glyph = fs.createReadStream(file) var name = options.names[idx] - var unicode = String.fromCharCode(options.codepoints[name]) - var ligature = '' - for(var i=0;i