satori icon indicating copy to clipboard operation
satori copied to clipboard

Unicode font breaks

Open mcnaveen opened this issue 2 years ago • 6 comments

Bug report

Description / Observed Behavior

When I tried to use Tamil Font (Unicode) (Example: https://fonts.google.com/specimen/Baloo+Thambi+2) it was not rendering properly. So I tried the same one in /pages/index.js where it's working properly.

What kind of issues did you encounter with Satori?

image

Expected Behavior

image

Reproduction

I created this repo (Main Branch): https://github.com/mcnaveen/bug-vercel-og

Additional Context

Satori version, and any other context about the problem here.

mcnaveen avatar Oct 16 '22 04:10 mcnaveen

expected Behaviour try using Unicode Tamil Fonts it will work before pulling Unicode encoding and trying it

encodeURIComponent(`எவரும், அடிமையாக வைத்திருக்கப்படுதலோ அல்லது அடிமைப்பட்ட நிலையில்
        வைத்திருக்கப்படுதலோ ஆகாது; அடிமை நிலையும் அடிமை வியாபாரமும் அவற்றில்
        எல்லா வகைகளிலும் தடைசெய்யப்படுதல் வேண்டும்.`);

Make sure that your development environment has Tamil font installed

Linux

sudo apt-get install fonts-indic

I follow this method for HTML Canvas Text

mskian avatar Nov 04 '22 12:11 mskian

I have already Tamil Fonts installed in my development environment. Using encodeURIComponent returns image like this.

image

mcnaveen avatar Nov 05 '22 15:11 mcnaveen

Oops just noticed it has a Unicode support issue - Check output

mskian avatar Nov 05 '22 16:11 mskian

I guess it's an issue with opentype.js

image

sahithyandev avatar Jan 10 '23 04:01 sahithyandev

@sahithyandev I think so. Seems this is not new!

https://github.com/opentypejs/opentype.js/issues/390

mcnaveen avatar Jan 10 '23 06:01 mcnaveen