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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrading from 2.0.2 to 3.0.0 results in loss of rendering of emojis #47

Open
rbozan opened this issue Mar 19, 2024 · 3 comments
Open

Comments

@rbozan
Copy link

rbozan commented Mar 19, 2024

Using 2.0.2 emojis render properly, but 3.0.0 does not render emojis anymore and renders them as square blocks.

Can be as simple as:

<div tw="flex flex-col w-full h-full items-center justify-center bg-purple-50">
馃槼
</div>
	return await ImageResponse(htmlTemplate, {
		width: 1200,
		height: 630,
		fonts: [
			{
				name: 'Lexend',
				data: await (
					await fetch(
						'https://github.com/googlefonts/lexend/raw/main/fonts/lexend/ttf/Lexend-Bold.ttf'
					)
				).arrayBuffer(),
				weight: 700
			},

			{
				name: 'Lexend',
				data: await (
					await fetch(
						'https://github.com/googlefonts/lexend/raw/main/fonts/lexend/ttf/Lexend-Medium.ttf'
					)
				).arrayBuffer(),
				weight: 500
			}
		]
	});
@theetherGit
Copy link
Collaborator

Attach a screenshot please.

@brennerm
Copy link

Seeing the same behavior.
Generated image with 2.0.2:
2 0 2

Generated image with 3.0.0 (unchanged code):
3 0 0

Let me know if I can support you in any way.

@theetherGit
Copy link
Collaborator

Ok, If you wanna contribute please do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants