sveltekit-og
sveltekit-og copied to clipboard
upgrading from 2.0.2 to 3.0.0 results in loss of rendering of emojis
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
}
]
});
Attach a screenshot please.
Seeing the same behavior.
Generated image with 2.0.2:
Generated image with 3.0.0 (unchanged code):
Let me know if I can support you in any way.
Ok, If you wanna contribute please do that.
graphemeImages are missing and basically you can not pass them even though they are mentioned in the types of this package. Anyways, even after adding the graphemeImages, they render in SVG but when converting them to PNG they seem to be gone (at least the remote ones)