Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
lgaroche opened this issue Aug 8, 2024 · 1 comment
Open
1 task done

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

lgaroche opened this issue Aug 8, 2024 · 1 comment
Assignees
Labels
Help Needed Misc: Help Needed

Comments

@lgaroche
Copy link

lgaroche commented Aug 8, 2024

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 dalechyn self-assigned this Aug 10, 2024
@dalechyn
Copy link
Collaborator

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?

@dalechyn dalechyn added the Help Needed Misc: Help Needed label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Needed Misc: Help Needed
Projects
None yet
Development

No branches or pull requests

2 participants