jaywcjlove / svgtofont

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

生成后一部分图标显示有问题(图标中间填充不展示) #162

Open 972890694 opened 2 years ago

972890694 commented 2 years ago

生成的字体图标中间部分不展示 原图 image 生成后 image

972890694 commented 2 years ago

贴一下svg `

` 原图 image 生成后的图 image

coder0107git commented 2 years ago

What is your configuration?

972890694 commented 2 years ago

svgtofont({ src: path.resolve(rootPath, 'svg'), dist: path.resolve(rootPath, 'style', 'fonts'), fontName: 'el-icons-next', styleTemplates: path.resolve(process.cwd(), 'script', 'templates'), classNamePrefix: 'el-icon', css: { output: 'src/style', fontSize: '24px', cssPath: './fonts/', fileName: 'el-icons' }, svgicons2svgfont: { fontHeight: 1024, ascent: 960, descent: -64 } });

huzhongchun commented 2 years ago

是「fill-rule="evenodd"」不支持吗 @jaywcjlove

jaywcjlove commented 2 years ago

@huzhongchun 是的支持纯 path,因为要输出各种格式的字体文件。

包括旋转之类的都不支持。可以输出 react 组件去使用,这样就支持了。我项目就是这样使用的

jaywcjlove commented 2 years ago

@972890694

vanswang commented 2 years ago

是「fill-rule="evenodd"」不支持吗 @jaywcjlove

测试下来 fill="none" 也不支持~

jaywcjlove commented 1 year ago