fix: 解决了firefox的问题,可能解决了safari的问题 - #10
Merged
Merged
Conversation
Owner
|
太妙了!感谢 pull! 测试下来 火狐上的绘制报错确实是高度错误导致的。 |
Contributor
Author
|
感谢认同🤣 僅支持案頭端 Chrome、Edge 瀏覽器。
Safari、Firefox 下存在嚴重問題 |
Owner
是的,终于可以把这个提示去掉了🤣 Safari canvas 系列 API 的内存占用限制通过共用绘制元素也已经基本解决,正好一起上线www 🥰 |
Owner
|
我去复盘了一圈,总算好像理解了这个 bug 的根源,Safari 会在 字重 600 以上时 通过简单的横向重复渲染字型让字体看起来变重,在这个过程中没有考虑阴影之类的细节 🤬🤬🤬 不愧是 Safari、仿佛现代 IE6,每次都能在她身上发现匪夷所思的神奇特性 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
firefox的问题
make.js里
metrics.fontBoundingBoxDescent和metrics.fontBoundingBoxAscent在firefox下不支持。我做了适当的替换,换成了用fontSize表示。不知是否合适。(我测试了一下应该没问题)safari阴影
其实我没有遇到 issue#1 那种三叠重影,只是发现阴影有点重。我在 make.js 中的
ctx.shadowBlur做了适当的修改。当然系数我不知道多少合适,有待讨论,我标在 221 行注释里了。
预览
桌面(chrome safari firefox)
firefox ios
chorme ios
safari ios