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

refactor: support esm & typescript #90

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Jackie1210
Copy link

@Jackie1210 Jackie1210 commented Aug 9, 2023

Hi, there! This is a satori contributor, currently satori has a lot of issues releated to font where we use opentype.js to render font. We are looking for a better font renderer so that we can make satori better(see vercel/satori#83).

Based on bg above, I find this lib has following problems:

  • not friendly with typescript
  • not support esm

To make this lib a modern lib, i make this PR. Looking forward to your feedback~

@Jackie1210 Jackie1210 changed the title refactor: make harfbuzzjs a mordern npm lib refactor: support esm & typescript Aug 9, 2023
@Jackie1210
Copy link
Author

CC @shuding

@behdad
Copy link
Member

behdad commented Aug 9, 2023

cc @chearon

@chearon
Copy link
Contributor

chearon commented Aug 10, 2023

I definitely think it would be great to have the JS parts written in TypeScript. I'm not sure about all of the rest. Since this library is framework-agnostic I wonder if the React stuff belongs in a separate demo repo. I can try to make a real review soon.

@Jackie1210
Copy link
Author

@chearon Don't worry about react stuff which is just a playground. I have make this lib a monorepo and react stuff will not affect final bundle result of harfbuzzjs. What I do is just translate original example code to a vite-react demo repo. If needed, I am pleased to refine playground for better DX.

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

Successfully merging this pull request may close these issues.

3 participants