Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
972890694 opened this issue May 9, 2022 · 8 comments

Comments

@972890694
Copy link

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

@972890694
Copy link
Author

贴一下svg
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M20.25 12.9116V9.08286V4.10597C20.25 3.49516 19.7223 3 19.0714 3H4.92857C4.27766 3 3.75 3.49516 3.75 4.10598V12.9116C3.75 14.7068 4.67859 16.3902 6.2405 17.4267L11.3195 20.797C11.7273 21.0677 12.2727 21.0677 12.6805 20.797L17.7595 17.4267C19.3214 16.3902 20.25 14.7068 20.25 12.9116ZM14.1906 8.03039L13.1299 6.96973L9.9482 10.1514L12.0911 12.2943L9.96967 14.4157L11.0303 15.4764L14.2124 12.2943L12.0695 10.1514L14.1906 8.03039Z" fill="#000000" /> </svg>
原图
image
生成后的图
image

@coder0107git
Copy link

What is your configuration?

@972890694
Copy link
Author

972890694 commented Jun 13, 2022

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
Copy link

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

@jaywcjlove
Copy link
Owner

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

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

@jaywcjlove
Copy link
Owner

@972890694

@vanswang
Copy link

vanswang commented Jul 1, 2022

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

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

@jaywcjlove
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants