Open micahlt opened 4 years ago
You need to go to the Google URL in your browser, and copy the CSS that it returns into a local CSS file. See it in action on https://beatjosh.com/budgets/FY2019/CTH
I'm experiencing the same issue while trying to generate a base-64 PNG image. I'm loading the google fonts using webfontloader
. Is this the only workaround to this? @MSCAU?
This worked for me. just add crossorigin="anonymous"
<!-- add google font -->
<link rel="preconnect" crossorigin="anonymous" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Prompt:wght@100;300;400;500;600;700&display=swap"
rel="stylesheet"
crossorigin="anonymous"
/>
@thingnoy thank you, crossorigin="anonymous"
also worked for me.
Use case: description, code
I'm using
dom-to-image
to generate little cards for users on ScratchSee https://repl.it/@micahlt/GetThatDesc for the full project.
Expected behavior
It'll generate a PNG of the
card
div and download it.Actual behavior (stack traces, console logs etc)
(And no, it doesn't download the image)
Library version
I'm using the latest version.
Browser