niklasvh / html2canvas

Screenshots with JavaScript
https://html2canvas.hertzen.com/
MIT License
30.61k stars 4.81k forks source link

Some font families not loading with foreignObjectRendering: true #2903

Open lvandernoll opened 2 years ago

lvandernoll commented 2 years ago

Bug reports:

I'm trying to generate a canvas containing text. Because I need foreignObjectRendering to use svg defs to make outline filters for the text. Some fonts are working correctly, some show differently and some don't work at all and I don't have a clue what the difference is. As you can see in my CodeSandbox, the first font is loaded but shows a little thicker, and the second font is not loaded at all.

I need either the fonts to be working with foreignObjectRendering, or the SVG filter working without foreignObjectRendering.

Specifications:

lvandernoll commented 2 years ago

Any chance someone could take a look at this?

c-plus-plus-equals-c-plus-one commented 2 years ago

I'm loking for a fix of this

webceoboy commented 1 month ago

+1