harfbuzz / harfbuzzjs

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

New: Use the latest harfbuzz to build hb-subset.wasm #32

Closed yisibl closed 3 years ago

yisibl commented 3 years ago

The current subset cannot properly subset the COLR/CPAL fonts.

  1. Open https://harfbuzz.github.io/harfbuzzjs/subset/
  2. Drag and drop colr-table.ttf
  3. Enter abc, the font actually downloaded cannot be used.

After rebuilt the WASM file, it is fine.

yisibl commented 3 years ago

@ebraminio @khaledhosny PTAL

papandreou commented 3 years ago

I also ran into a bug that's already fixed in harfbuzz, so +1 to getting a new harfbuzzjs release out.

In the mean time I've released a fork called harfbuzzjs-papandreou.

papandreou commented 3 years ago

Thanks, @ebraminio 🎉

ebraminio commented 3 years ago

@papandreou Thank you! Just let me know whenever you wanted another update :)

@yisibl Just updated https://harfbuzz.github.io/harfbuzzjs/subset/ and enabled subset of GPOS/GSUB/GDEF on the demo also, let me know if any other thing is needed to your use case :)

yisibl commented 3 years ago

Thanks, @ebraminio

Can this issue(https://github.com/harfbuzz/harfbuzz/issues/1017) be closed now?

It would be better if it could be stated in the document which tables support subset.

ebraminio commented 3 years ago

@yisibl Oh, the latest update I have from them is they are almost complete by not finished yet, for the demo I had to enable them manually and that is also what @papandreou in https://github.com/papandreou/subset-font also does, hopefully soon they can be declared finished so we can remove the manual enabling code :)

yisibl commented 3 years ago

@ebraminio Nice!

Are there any plans for https://github.com/harfbuzz/harfbuzz/issues/2843?

behdad commented 3 years ago

The GSUB/GPOS subsetting indeed is complete. We are going to flip it on by default. COLR/CPAL subsetting also should work already.

yisibl commented 3 years ago

Fixed in https://github.com/harfbuzz/harfbuzz/pull/2970