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

emoji显示正常了,但font-awsome还是有问题 #12

Closed
tohsakrat opened this issue Mar 13, 2023 · 4 comments
Closed

emoji显示正常了,但font-awsome还是有问题 #12

tohsakrat opened this issue Mar 13, 2023 · 4 comments
Labels

Comments

@tohsakrat
Copy link

如题,以字体方式引入的font-awsome图标的unicode一般是形如'\f0cb'这样,请问应该修改哪里可以让这些字符得以解析呢?

@qq15725
Copy link
Owner

qq15725 commented Mar 14, 2023

(。・_・。)ノI’m sorry~ 是有问题,我还以为一起解决了,大意了

@qq15725
Copy link
Owner

qq15725 commented Mar 14, 2023

\f 确实会被 \u000C 匹配,但是我好像没法复现使用 fa 引起的情况

https://github.com/qq15725/modern-screenshot/blob/main/test/fixtures/css.font-icon.html
https://github.com/qq15725/modern-screenshot/blob/main/test/fixtures/css.font-icon.png

可以提供个可复现的代码吗

@tohsakrat
Copy link
Author

您好,复现在此!
https://gzszd.club/html2pngBug.html
我重新定位了一下,问题似乎是一条外链css的跨域问题造成的
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.5.0/build/styles/github.min.css">
这条css本身和字体无关,却因为它的加载出错,导致了字体未能正常截图。
请问有办法通过修改项目,不要让某个文件的加载失败引起连锁反应,影响其他样式的加载吗?

另外,不知有没有办法对iframe标签也进行完整截图呢?
感谢大佬!

@qq15725
Copy link
Owner

qq15725 commented Mar 15, 2023

跨域 StyleSheet 访问 CSSRules 导致的整体逻辑中断在最新版本中应该修复了

跨域 iframe 由于无法获取到 iframe?.contentDocument?.body 目前应该无法解析 clone 😄

@qq15725 qq15725 closed this as completed Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants