TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

191 pointsby hsfzxjy9 months ago
During the hype of llama.ttf months ago, I was speculating the potential of WASM shaper for even crazier purpose, one that fitter to a font shaper's duty -- to synthesize font at runtime. This project as proof-of-concept implements a synthesizer that generates and rasterizes handwriting-style font, backed by a super-lightweight RNN model (~14MiB).

19 comments

PhilipRoman9 months ago
I bet this is what people felt when JavaScript was first demoed on the web.<p>In the year 2077, when each font will run it&#x27;s own virtual machine on WASM containing a &quot;minimal&quot; Ubuntu image, some enlightened blogger will suggest server side rendered fonts as a performance improvement.
评论 #41312551 未加载
pjmlp9 months ago
Nice demo.<p>Without trying to steal the thread, what I would care is actually the opposite direction.<p>Neither in Swift Playgrounds, nor in any other programming development environment apps for both mobile OSes, have I found a good development experience using pen instead of keyboard.<p>Given how many of us &quot;program&quot; in paper notebooks, it is quite incredible that besides a couple of research projects done by PhD students, no one cares to actually make it more widespread in a usable way.
评论 #41313797 未加载
评论 #41318401 未加载
tombh9 months ago
I&#x27;ve read the README and watched the video, but I&#x27;m still not sure what this is doing? I know it can &quot;synthesize [a] font at runtime&quot;, so does that mean it&#x27;s creating a random handwritten font as you type? But it&#x27;s not based on the user&#x27;s handwriting?
评论 #41317872 未加载
gwern9 months ago
This looks like it&#x27;d be quite useful for faking documents more convincingly. Existing handwriting fonts always have tell-tale regularities and there&#x27;s so few that forensics analysis exposes them easily.
jcelerier9 months ago
I wonder what makes SIMD an improvement here - in the end it all boils down to TTF bytecode and I don&#x27;t think this comes with SIMD instructions, right?
评论 #41310513 未加载
评论 #41315432 未加载
fulafel9 months ago
I wondered why there&#x27;s just a video and no demo. But does it require the new wasm features in the browser ttf support?
评论 #41317494 未加载
BigParm9 months ago
Wtf is happening here what are the inputs and outputs? Hard to tell what this program does for me
评论 #41316290 未加载
kragen9 months ago
this is amazing! i&#x27;m guessing you can probably get it to antialias without much more work<p>as the demo video shows, it&#x27;s probably not something you want to have in between you and the ability to scroll a web page or close a tab. but i guess using harfbuzz now means we&#x27;re buying into a turing-complete virtual machine running an arbitrary program in order to display a glyph. how seriously crippled are the harfbuzzless rendering paths? i&#x27;m assuming opting out of harfbuzz means opting out of arabic, devanagari and other indic scripts, etc.? is there a less out-of-control alternative that doesn&#x27;t leave two billion people out in the cold?
评论 #41310628 未加载
vintermann9 months ago
So you trained a THAT small RNN to make this good handwriting? I&#x27;m actually even more impressed at that than at the crazy pipeline turning it into a font in realtime.
评论 #41316270 未加载
calebj0seph9 months ago
Damn, this is impressive!<p>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.
评论 #41316969 未加载
adzm9 months ago
I&#x27;ve been curious about seeing if harfbuzz etc could help create a styled Elianscript font but not really sure where to start.
eigenvalue9 months ago
Fun hack. I bet Alex Graves never in a million years anticipated that his PhD thesis work would be encapsulated in a novelty font.
a1o9 months ago
I don&#x27;t get it, why there&#x27;s no link to a GitHub pages website to test the thing?
评论 #41310712 未加载
评论 #41311514 未加载
einpoklum9 months ago
OP&#x27;s repository has a Makefile which assumes a docker daemon is available.
评论 #41310775 未加载
andrewmcwatters9 months ago
It visually fails to preserve “handedness.”
piyushtechsavy9 months ago
Nice demo, for sure a fun app.
a21289 months ago
Link to llama.ttf, another fun font that abuses HarfBuzz for anyone interested (it runs a language model inside a font): <a href="https:&#x2F;&#x2F;fuglede.github.io&#x2F;llama.ttf&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fuglede.github.io&#x2F;llama.ttf&#x2F;</a><p>The llama.ttf video does a pretty good job explaining what the heck is going on
cyberax9 months ago
Year 2045: fonts become self-aware and go on a strikethrough.
评论 #41310989 未加载
评论 #41311558 未加载
评论 #41310992 未加载
评论 #41311434 未加载
dancemethis9 months ago
This is so cursed, there is so much that begs the question - &quot;why?&quot;...<p>I love it.<p>I can&#x27;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.
评论 #41310871 未加载
评论 #41310996 未加载