nfroidure / gulp-iconfont

Create icon fonts from several SVG icons
MIT License
854 stars 72 forks source link

Incrementing codepoint dont work #171

Open Smiike opened 6 years ago

Smiike commented 6 years ago

Since v10.0.0, When I add a new svg on an existing project, I have this error :

C:\Users\XXX\Desktop\gulp-task-svg2font-master\node_modules\ttf2woff2\jssrc\ttf2woff2.js:1
(function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=

Error: The unicode codepoint of the glyph bottom seems to be already used by another glyph.

New svg name is not incremented and take the first codepoint already in use : uEA01-iconname.svg instead of uEA0[+1]-iconname.svg

NaridaL commented 6 years ago

Are you mixing prefixed icons and non-prefixed icons?

See also: https://github.com/nfroidure/gulp-iconfont/issues/169#issuecomment-398712978

Smiike commented 6 years ago

Mixing prefixed icons

OK i'haven't see that, it'll be added in next update ?

NaridaL commented 6 years ago

Can you upload the icons you are having issues with and your config?

Smiike commented 6 years ago

Juste add a new svg in svg src folder (ex : assets/icons/*.svg) in a prefixed liste already prefixed with param : prependUnicode: true

Exemple Before run : uEA01-myincon1.svg uEA02-myicon2.svg ....

After run : uEA01-myincon1.svg uEA01-mynewicon.svg uEA02-myicon2.svg ...

NaridaL commented 6 years ago

Set startUnicode to something other than 0xEA01, so it doesn't overlap with the prefixed icons.

Smiike commented 6 years ago

I've already try it but it work juste one time ... Param : startUnicode: 0xE000,

Résult first run : uE000-newsvg1.svg Résult second run : uE000-newsvg2.svg

Error: The unicode codepoint of the glyph newsvg1 seems to be already used by another glyph.

NaridaL commented 6 years ago

I don't understand what you mean by first/second run? Please provide the icons and config, or at least the list of icon filenames you are trying to convert to a font.

bm2u commented 6 years ago

Hi @Smiike , have you seen this issue. Maybe it could help to solve your problem.