Comment by erk__

7 months ago

I did kinda the opposite and instead of making a font out of tetris I made a font play Tetris.

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

Coolest thing I've seen so far this year. Demo starts at 22:55 but the whole presentation is worth watching.

  • I agree. Watched the whole thing and the entire video is worth it.-

    (The "historical exploration" of type, and typesetting, even if an introduction, is great ...)

You demo the result in GIMP (with a Wasm runtime linked(?)) and in the font viewer FontGoogles, and there's someone else who is playing around with it in gedit. There's no way to make use of this in, say, Firefox, yet, even though it ships with Harfbuzz, right?

  • I could not get it to work when I looked into it last, for Gimp I actually installed it globally, I think neither Chrome or Firefox uses the system Harfbuzz. Going by the dependants of Harfbuzz on Arch [0] it might be possible that it works in Chromium with a custom Harfbuzz, but it is not something I have tried. And since it is still experimental it is not built by default in any distribution I know of.

    [0]: https://archlinux.org/packages/extra/x86_64/harfbuzz/

thats absolutely bananas, awesome job. The bad apple showcase is great too.

Nice demo. Really kicks all the "bytecode can never be fast --- we have to AOT everything" people in the teeth, doesn't it?