GoogleForCreators / web-stories-wp

Web Stories for WordPress
https://wp.stories.google
Apache License 2.0
765 stars 177 forks source link

Eyedropper tool on custom fonts not working as expected #11049

Closed bmattb closed 1 year ago

bmattb commented 2 years ago

Bug Description

Originally reported by @merapi

There might be some issues with Custom Fonts & Eyedropper (top 3 are existing fonts, bottom 3 are newly added custom fonts). Custom fonts appear differently in the editor when the eyedropper tool has been selected.

NB - also note that the second font (which is not a custom font) has also changed it's appearance.

Canvas: image15

Eyedropper: image17

Expected Behaviour

Steps to Reproduce

Screenshots

Additional Context

swissspidy commented 2 years ago

@merapi This might be more of a bug with the eyedropper and html-to-image than with the custom fonts and you are a bit more familiar with that.

I briefly checked htmlToImage.getFontEmbedCSS(fullbleedContainer) in prepareEyedropper() and my custom fonts are definitely in there. So not sure what could be the issue.

merapi commented 2 years ago

This might be more of a bug with the eyedropper

Totally. I've just noticed that none of the custom fonts worked in the eyedropper, so it might be the mix of both that is causing the issue.