Just imagine.
@simoncozens In implementing the custom shaping program in the font, did patterns emerge that could be introduced in OpenType? While I admire the technique, embedding a WASM binary feels like a brute force solution that might hinder its adoption.
I know it’s alluring since a possible WASM adoption would eliminate the need for future shaping software updates and standard discussions. You as the font engineer are in control, you can fix it yourself.
@florian @simoncozens Hi Florian. That's for your question. Since I introduced the Wasm-in-a-font idea, I like to expand on it a bit here.
When thinking about the limitations of OpenType layout, and particularly its inefficient (chained-)contextual rules, I realized that the same data can be expressed much more efficiently as a trie data structure, which can of course be added to the font format uncontroversially.
If you take that thought a bit further and allow loopbacks to other states, it would become the equivalent of a sparsely-encoded state machine.
But font designers think in terms of rules, not states. From there, you would need to write a compiler that takes the rules and builds the state machine. 1/3
Now you can play with the Nastaliq shaper on the web!
https://simoncozens.github.io/wasm-shaping/
WASM Shaping