tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.32k stars 1.68k forks source link

Plugin can't handle styles and fonts which were added on page by @import #158

Open abriginets opened 6 years ago

abriginets commented 6 years ago

Use case: subject. I have this code in my style.css:

@import url('https://fonts.googleapis.com/css?family=Lobster|Montserrat:300,400,500|Open+Sans:300,300i,400,600,700|Rubik:300,400,500|Shrikhand');

But I'm recieving an image with default font texts and squares instead of icons. I've mentioned that plugin understands @font-face, but this is not the way of mine and I prefer to get fonts via @import. Also, Firefox can't load external images.

Expected behavior

To load fonts from @import and external images

Actual behavior (stack traces, console logs etc)

Library version

2.6

Browsers

areyes21 commented 8 months ago

were you able to solve it?