RazrFalcon / rustybuzz

A complete harfbuzz's shaping algorithm port to Rust
MIT License
498 stars 34 forks source link

Embed experimental `wasm` shaper. #117

Open asibahi opened 6 days ago

asibahi commented 6 days ago

Hello.

First of all congratulations on reaching the 8.0.0 milestone. Truly impressive work by @LaurenzV. There is an issue on harfbuzz to bump version to 9 :)

I am wondering if it would be within the scope of this project to include API and parsing for the experimental wasm shaper in harfbuzz. As far as I can tell, it is "just" an extra font table and some C API. The wasm modules are embedded in the font itself.

Here is the design document, with some fairly interesting examples: https://github.com/harfbuzz/harfbuzz/blob/main/docs/wasm-shaper.md This is an insane project built on the shaper: https://github.com/fuglede/llama.ttf

This would allow more people (font designers for example) to experiment with the feature without the massive gate of requiring knowledge on how to build harfbuzz, since its not enabled by default and the only program that comes with it enabled is (an experimental version of) FontGoogles.

The main advantage for including this in rustybuzz as a non-default feature is that building a rust crate is infinitely simpler than building a C++ library, even I can do it!!

RazrFalcon commented 6 days ago

I have no plans on implementing any non-standard TrueType features. But if someone will send a PR - I will merge it.