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

Unicode font breaks #215

Open
mcnaveen opened this issue Oct 16, 2022 · 8 comments
Open

Unicode font breaks #215

mcnaveen opened this issue Oct 16, 2022 · 8 comments

Comments

@mcnaveen
Copy link

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.

@mskian
Copy link

mskian commented Nov 4, 2022

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

@mcnaveen
Copy link
Author

mcnaveen commented Nov 5, 2022

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

image

@mskian
Copy link

mskian commented Nov 5, 2022

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

@sahithyandev
Copy link
Contributor

I guess it's an issue with opentype.js

image

@mcnaveen
Copy link
Author

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

opentypejs/opentype.js#390

@errhythm
Copy link

Is there any update on this? Indic language fonts are still breaking while rendering.

Generated SVG:
image

Satori HTML Native:
image

OG Playground Test

@vivekkj123
Copy link

Seems the issue isn't still solved. I think this issue needs more priority from @vercel, as this impacts almost all Indic languages.

@vivekkj123
Copy link

Also, I think @foliojs/fontkit have more support for Indic fonts, if it's possible migrating from opentype.js will resolve this issue

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

5 participants