harfbuzz / harfbuzzjs

Providing HarfBuzz shaping library for client/server side JavaScript projects
https://harfbuzz.github.io/harfbuzzjs/
Other
204 stars 35 forks source link

refactor: support esm & typescript #90

Open Jackie1210 opened 1 year ago

Jackie1210 commented 1 year ago

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 https://github.com/vercel/satori/issues/83).

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

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

Jackie1210 commented 1 year ago

CC @shuding

behdad commented 1 year ago

cc @chearon

chearon commented 1 year ago

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 commented 1 year ago

@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.