jaywcjlove / svgtofont

Read a set of SVG icons and ouput a TTF/EOT/WOFF/WOFF2/SVG font.
https://jaywcjlove.github.io/svgtofont
MIT License
515 stars 81 forks source link

fix: unicode autoincrement #206

Closed chenyulun closed 1 year ago

chenyulun commented 1 year ago

修复_startUnicode为空的场景unicode不自增的问题

chenyulun commented 1 year ago

场景一: 没有getIconUnicode配置或者配置执行无返回, curUnicode === _curUnicode && !_startUnicodetrue,自增 场景二:返回不一样的_curUnicode和一样的_startCode, curUnicode === _curUnicodefalse, 不自增,下一次接着使用老的startCode 场景三:返回了不一样的unicode和不返回_startCode, curUnicode === _curUnicodefalse, 不自增,下一次接着使用老的startCode 场景四 : 返回了一样的unicode和不一样的startCode,curUnicode === _curUnicode && startUnicode === _startUnicodefasle,不自增,被重新设置覆盖 场景五 : 返回不一样的unicode和不一样的startCode,curUnicode === _curUnicodefasle,不自增,被重新设置覆盖,不管是否和之前相同

wintercounter commented 1 year ago

I believe this PR would solve our problem also. After upgrading to the latest, all icons are the same in the generated font files.

chenyulun commented 1 year ago

My fault, you can use the lower version(3.25.1) first, and it should be fixed later.

jaywcjlove commented 1 year ago

Upgrade v3.25.4 @wintercounter @chenyulun