Live data from Hacker News

Show HN: Handwriter.ttf – Handwriting Synthesis with Harfbuzz WASM

github.com

11–20 of 60 posts

Re: Show HN: Handwriter.ttf – Handwriting Synthesis with Harfbuzz WASM

#11

OP's repository has a Makefile which assumes a docker daemon is available.

The project must be tested in an application linked against libharfbuzz with WASM shaper enabled. Since it's not easy to build a library like this, I make a Docker image which contains both the ttf file and a modified gedit, so that anyone can test the project with a single command.

Re: Show HN: Handwriter.ttf – Handwriting Synthesis with Harfbuzz WASM

#12
post #10
post #6

Earlier quoted context omitted.

OP is asking how SIMD is beneficial to this specific application. If there's a small neural network involved then evaluating that is probably a good place to use SIMD.

Yes. The program actually includes an ONNX runtime, which uses SIMD to accelerate NN inference.

but... the program ends up entirely compiled and executed as TTF bytecode in the end right, since it's entirely contained in the TTF font ? And TTF bytecode is only the following instructions : https://developer.apple.com/fonts/TrueType-Reference-Manual/... and I don't see anything related to SIMD in there

Re: Show HN: Handwriter.ttf – Handwriting Synthesis with Harfbuzz WASM

#13
post #10

Earlier quoted context omitted.

Yes. The program actually includes an ONNX runtime, which uses SIMD to accelerate NN inference.

but... the program ends up entirely compiled and executed as TTF bytecode in the end right, since it's entirely contained in the TTF font ? And TTF bytecode is only the following instructions : https://developer.apple.com/fonts/TrueType-Reference-Manual/... and I don't see anything related to SIMD in there

No that is not what is happening, HarfBuzz have a experimental Wasm shaper, so the font embeds some wasm code that tells Harfbuzz what to output.

https://github.com/harfbuzz/harfbuzz/blob/main/docs/wasm-sha...

Re: Show HN: Handwriter.ttf – Handwriting Synthesis with Harfbuzz WASM

#16

This is so cursed, there is so much that begs the question - "why?"... I love it. I can't wait for the next beautiful nightmare. Maybe someone should mix font rendering with PDF rendering. Of course, with a LLM doing something in the middle.

The answer is "no why", just for fun :) Though I learned a lot about how to stuff an NN model in a WASM binary and some tricks to optimize performance.
Post reply on HN