ttf.js - A JavaScript TrueType Font Engine For Modern Browsers And Node.js (github.com)

54 points by Hirvesh ↗ HN
via Functionn - Open Source Resources For Web Developers & Designers: http://functionn.blogspot.com/2012/12/ttfjs-javascript-truetype-font-engine.html

P.S. Functionn contains a whole lot more of awesome resources like ttf.js. There only a fraction of them I can post here at a time. Take a look if you're interested, and subscribe:

http://functionn.blogspot.com

8 comments

[ 3.4 ms ] story [ 37.9 ms ] thread
I really love how the author has taken pains to ensure that everything works in browsers and Node.js. The demo is all client side code, which is truly impressive--there is no uploading to a Node.js server to retrieve SVGs or images.
My workmate did something similar few years back, http://cufon.shoqolate.com/generate/

(Converts font files to js structs and renders them into canvas/vml, this was meant as sIRF replacement before native support for CSS custom fonts was common.)

Heh, many production sites still use Cufon, mind. :)
very nice!
Awesome, I tried a Chinese TTF font and it works! For many years I've been waiting for some JS code which supports CJK fonts, none of typekit, cufon etc. worked. This is really awesome.