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

下载图像时,字体没有正确显示 #3

Open
itorr opened this issue Oct 17, 2022 · 2 comments
Open

下载图像时,字体没有正确显示 #3

itorr opened this issue Oct 17, 2022 · 2 comments
Labels
新特性 讨论新功能新特性

Comments

@itorr
Copy link
Owner

itorr commented Oct 17, 2022

No description provided.

@huiminxu
Copy link

@itorr 请问为啥要加 setTimeout 呢

@itorr
Copy link
Owner Author

itorr commented Nov 30, 2022

@itorr 请问为啥要加 setTimeout 呢

是因为 SVG 格式图像,在几乎全部浏览器中通过 (new Image()).src = svgDataURL 形式触发加载完成事件时,其中引用的字体实际上还没有加载完成,在这个瞬间获取到的图像是字体没有正确加载的样子。

这个问题我没有找到除了 setTimeout 暂时规避之外的其他解决方法,如果现在还能在手机上复现,那说明这个问题还要继续寻找修复方案

@itorr itorr reopened this Nov 30, 2022
@itorr itorr changed the title 字体加载完成再显示下载按钮 下载图像时,字体没有正确显示 Nov 30, 2022
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