How can I install font on fly.io

Recently I created a personal discord bot, and I made it have a image generating feature by @napi-rs/canva node package

And I need some Chinese text on image, but it seems that fly.io’s server doesn’t have any font installed yet, so I registered my own:


And by console log it looks successful, but when I generated image, still no any text show up: (the text should appear beside “學籍番號” and 氏名”)
image

How can I fix it or use other tools? Thx

This sounds more like a problem with your application than fly’s platform. I would recommend trying to reproduce this locally first. Uninstall this font from your dev machine (if applicable) and see if you still see the bug.

Also, from what I see in the docs for that package, make sure you are setting ctx.font correctly before you call fillText or strokeText.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.