Closed mateusfg7 closed 1 year ago
Before all, thanks for this lib, I am searching for a related thing for a long time!
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.
domToPng
preview
result
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:
tailwind.config.js
layout.tsx
next/font
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.
Fixed, please try upgrading to modern-screenshot@^4.4.26
Solved, thanks again!
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](https://github.com/qq15725/modern-screenshot/assets/40613276/a6281219-4cf9-443e-8fd1-4be556bee36b)
result![yutyiytuituyrty](https://github.com/qq15725/modern-screenshot/assets/40613276/0ed7762b-5fc0-406c-a940-551bf798f91e)
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:
tailwind.config.js
where I setup my custom fontlayout.tsx
where I usenext/font
to get font classesdomToPng
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.