wevm / frog

Framework for Farcaster Frames 🐸
https://frog.fm
Other
414 stars 94 forks source link

Different font rendering between wrangler:dev and frog dev #467

Open lgaroche opened 1 month ago

lgaroche commented 1 month ago

Describe the bug

Using a cloudflare worker default template, fonts are rendered differently between devtools started with npm run dev and npm wrangler:dev. The latter looks like it's falling back to a default font. The first one is the same as when deployed on Vercel, and supports emojis.

Screenshot 2024-08-09 at 01 01 20 Screenshot 2024-08-09 at 01 01 48

Link to Minimal Reproducible Example

No response

Steps To Reproduce

Install the frog boilerplate with cloudflare workers:

npm init frog -- -t cloudflare-worker

Install the dependencies, then start the devtools:

npm run dev

Now start the devtools with wrangler:

npm run wrangler:static
npm run wrangler:dev

Notice how the fonts differ in the two modes.

Frog Version

0.15.9

TypeScript Version

5.5.4

Check existing issues

Anything else?

No response

dalechyn commented 1 month ago

Hi @lgaroche!

I've reproduced your issue and indeed see the difference.

I think the issue is somewhere within the hono-og package that generates the image response for cloudflare workers. I was able to pull out a font by adding it to imageOptions – but couldn't get images to work.

@jxom, @tmm, do you guys have an idea why hono-og could render a different image than using it with other setups?