-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Font variation after Chrome update #225
Comments
+1. Have the same issue. Very bad |
+1. Have the same issue. |
1 similar comment
+1. Have the same issue. |
it applies to 2.6.0 (latest at the time of writing) as well |
I've resolved this bug on our company product. The real problem is a css font property you getting here: function cloneStyle() {
If I don't do it such way, my Firefox & Chrome will warn you that whole font statement is wrong and no one of your font property except browser default will not be applied for svg that will become wrong canvas. You can check it on your own if you set breakpoint to the It's not looks like a "silver bullet" so I'll wait for more elegant solution with community help. |
@tsayen Considering how much a loss of functionality this is for Chrome users, what is the process for expediting a new release that fixes this? The one-liner that @newmandani suggested seems fine as long as the fontStretch was originally 100% (also since no browsers support font-stretch right now, it's a fine bandaid for any case at worst). |
This repo have the fix: https://github.com/MichalBryxi/dom-to-image |
This is actually better fixed by copying the font itself over. See 1904labs@7d1476a#diff-94b43d5a54b46e49799cce165ab4fec0R236 |
Expected behavior
An image is created that is identical to the DOM element being referenced
Actual behavior
Font styles (weights, size, etc...) seems to be reverting to the browser defaults.
Library version
2.5.2
Browsers
The text was updated successfully, but these errors were encountered: