I did it with the Harfbuzz shaper which now have experimental support for embedding WebAssembly programs to shape fonts.
Talk where I show it off: https://www.youtube.com/watch?v=Ms1Drb9Vw9M
Source code: https://github.com/Erk-/programmable-fonts
You can also see actual uses of this WebAssembly embedding to show that is not just for fun here: https://github.com/harfbuzz/harfbuzz-wasm-examples
This is precisely the sort of beautiful thing I love finding on HN.[a]
Your work put a smile on my face.
Thank you for sharing it here!
---
[a] For those here who only want to see the demo, it starts at 22:50: https://youtu.be/Ms1Drb9Vw9M?t=1370
---
PS. I also submitted your demo to HN. I think it deserves its own post: >>40737961