A browser preview can look correct while the downloaded image is wrong. The usual failure is timing: CSS eventually applies the custom font to the preview, but Canvas draws once. If the font is not ready at that exact moment, fillText() can silently use a fallback face.
Source: [Dev.to](https://dev.to/hellokai/rendering-custom-fonts-to-a-2048px-png-with-canvas-2c03)