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

Default font on Firefox #29

Closed mateusfg7 closed 1 year ago

mateusfg7 commented 1 year ago

Before all, thanks for this lib, I am searching for a related thing for a long time!

Problem

I am having issues with font on Firefox, when I save the image using domToPng, the browser default font is used instead my custom font.

preview image

result yutyiytuituyrty

Environment

Browser: Firefox 113.0.2 Framework: Next.js@13.4.4 modern-screenshot: 4.4.25 Related Libs: react@18.2.0, tailwindcss@3.3.2, postcss@8.4.24 Repo: https://github.com/mateusfg7/rifa Related source:

Additional information

I also tested on Chrome and works fine. The problem only occurs on production environment, when I run the app on development environment all works fine.

qq15725 commented 1 year ago

Fixed, please try upgrading to modern-screenshot@^4.4.26

mateusfg7 commented 1 year ago

Solved, thanks again!