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

Explore using Satori and resvg to render images #5

Open
3 tasks
dtinth opened this issue Mar 8, 2023 · 0 comments
Open
3 tasks

Explore using Satori and resvg to render images #5

dtinth opened this issue Mar 8, 2023 · 0 comments

Comments

@dtinth
Copy link
Member

dtinth commented Mar 8, 2023

Problems with using canvaskit-wasm:

canvas kit-wasm seems to not support multi-fonts and also the fallback font.

Because of this we cannot easily render emoji… Otherwise we must build our own font switching algorithm.

The current image generation code was created before Satori was released so the tool choice you see here is quite outdated (the upside is that it is lightweight (no need to fire up Google Chrome to take a screenshot) and it is cross platform (all wasm, no need for native libs, and fonts render the same way on all platforms)).

Going forward one way to improve the image generation may be to use something like Satori + resvg (Vercel does this). But IMO it’s not a high priority.

What to explore

  • Can Satori wrap Thai words?
  • Can Satori render emoji mixed with Thai text?
  • Can Satori render text with tone marks properly placed? e.g. วรรณยุกต์ไม่ลอย
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

1 participant