Hi all, I'm having a similar issue to this one: https://github.com/niklasvh/html2canvas/issues/328.
I created a widget that uses html2canvas to take a screenshot. The problem is that the widget must be inserted in a site inside an iframe, the capture works but the fonts don't load. Here is a simple example of what happens: test-case-iframe
@diego-rey I found that if your child frame is on the same domain as the parent, you can append a canvas element to the body of the child frame. Then pass that element to html2canvas using the canvas
option. It'll pick up the font definitions inside the child frame.
Oh the solution was simple. Thanks for the help @jasonbarry ! Doing this I was able to make it work.
@diego-rey can you provide example for your resolve?
Most helpful comment
@diego-rey I found that if your child frame is on the same domain as the parent, you can append a canvas element to the body of the child frame. Then pass that element to html2canvas using the
canvas
option. It'll pick up the font definitions inside the child frame.