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 #11

Closed
tohsakrat opened this issue Mar 12, 2023 · 1 comment
Closed

不支持emoji和font-awsome #11

tohsakrat opened this issue Mar 12, 2023 · 1 comment
Labels

Comments

@tohsakrat
Copy link

rt
一开始以为是字体跨域问题,后来仔细盘了一遍发现是一些特殊字体不能绘制。
不知道有没有办法解决QwQ

@qq15725
Copy link
Owner

qq15725 commented Mar 12, 2023

这个似乎是我在去除 svg+xml 解析异常的 ascii null 控制字符时,错误的正则把 \uD800-\uDFFF\uFFFE-\uFFFF 区域的 unicode 字符也移除导致的。

不过我发现多 unicode 的 emoji 在 svg+xml 解析时的字符宽度似乎和浏览器渲染不一致,例如

'😄'.split('').map(val => val.charCodeAt(0).toString(16)) 

// ['d83d', 'de04']

(这好像是另一个问题)

@qq15725 qq15725 added the Bug label Mar 12, 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