qq15725 / modern-screenshot

📸 Quickly generate image from DOM node using HTML5 canvas and SVG
https://toolpkg.com/html-to-image
MIT License
504 stars 36 forks source link

Google web fonts not working in Firefox. Getting DOMException: CSSStyleSheet.cssRules error. #16

Closed Dineshs91 closed 1 year ago

Dineshs91 commented 1 year ago

Steps To Reproduce

  1. Open a page with modern-screenshot in Firefox.
  2. Use a Google web font in the container.
  3. Generate image of the container (Containing the Google web font).

The following error shows up

Error while reading CSS rules from [https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@…;800&family=Slabo+27px:wght@300;400;500;700;800&display=swap](https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700;800&family=Inter:wght@300;400;500;700;800&family=Lato:wght@300;400;500;700;800&family=Montserrat:wght@300;400;500;700;800&family=Open+Sans:wght@300;400;500;700;800&family=Poppins:wght@300;400;500;700;800&family=Prompt:wght@300;400;500;700;800&family=Public+Sans:wght@300;400;500;700;800&family=Raleway:wght@300;400;500;700;800&family=Roboto:wght@300;400;500;700;800&family=Slabo+27px:wght@300;400;500;700;800&display=swap) DOMException: CSSStyleSheet.cssRules getter: Not allowed to access cross-origin stylesheet
Error Message & Stack Trace

error

Your Environment

qq15725 commented 1 year ago

Since Firefox CORS policy is currently unavailable, I'll close the issue for now