Live data from Hacker News

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

github.com

41–50 of 60 posts

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

#43

I wonder what makes SIMD an improvement here - in the end it all boils down to TTF bytecode and I don't think this comes with SIMD instructions, right?

It’s not TTF bytecode, but WASM bytecode. There’s an experimental version of HarfBuzz that can run this.

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

#45
post #31
post #9

Earlier quoted context omitted.

You can't test it in a browser, since no browser at present is linked against libharfbuzz with WASM shaper. Instead, one can test it with a modified local program such as gedit in the demo. As convenience, I built a Docker image that packs both the ttf file and the modified gedit together. You can try it out via `make run` as stated in the instructions.

Harfbuzz can be built easily to Wasm using Emscripten.

Interesting artifact of time it would be. Harfbuzz uses https://github.com/bytecodealliance/wasm-micro-runtime to execute wasm, so when compiled it would be wasm runtime running under another wasm runtime.

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

#46

So you trained a THAT small RNN to make this good handwriting? I'm actually even more impressed at that than at the crazy pipeline turning it into a font in realtime.

I didn't train the model myself. A pretrained model is adopted from another repo [0].

[0]: https://github.com/X-rayLaser/pytorch-handwriting-synthesis-...

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

#47
post #42

Wtf is happening here what are the inputs and outputs? Hard to tell what this program does for me

The handwriting in fact consists of multiple "tiny black box" glyphs, similar to pixels in traditional rendering. The program takes the text (e.g., "Hello world") as input, and works out the (x, y) locations of these block boxes.

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

#49

Damn, this is impressive! We built a WebGL text renderer with full CJK support using Harfbuzz for our production whiteboard web app. I thought that was complicated until now.

Is that open sourced? I want to render shakuhachi music notation in the browser trying to replicate the caligraphic style and it's not trivial.

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

#50
post #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.

Best reason!
Post reply on HN