News for hackers. Stuff that matters.

ttf.js - A JavaScript TrueType Font Engine For Modern Browsers And Node.js

https://github.com/ynakajima/ttf.js

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 | 54 points | on HN )
Re:ttf.js - A JavaScript TrueType Font Engine For Modern Bro... by vjeux on Wednesday December 05, 2012 @01:15AM (#4875154)
Cool, he is using my lib jDataView to read binary data in Javascript.

https://github.com/vjeux/jDataView

Re:ttf.js - A JavaScript TrueType Font Engine For Modern Bro... by digeridoo on Wednesday December 05, 2012 @08:44AM (#4876166)
nice, do you know if there is a reliable way to PUT binary data using XHR in JavaScript?
Re:ttf.js - A JavaScript TrueType Font Engine For Modern Bro... by fruchtose on Wednesday December 05, 2012 @03:28AM (#4875441)
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.
Re:ttf.js - A JavaScript TrueType Font Engine For Modern Bro... by Yaggo on Wednesday December 05, 2012 @03:58AM (#4875505)
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.)

Re:ttf.js - A JavaScript TrueType Font Engine For Modern Bro... by akx on Wednesday December 05, 2012 @05:12PM (#4878894)
Heh, many production sites still use Cufon, mind. :)
Re:ttf.js - A JavaScript TrueType Font Engine For Modern Bro... by Hirvesh on Tuesday December 04, 2012 @11:18PM (#4874842)
via Functionn - Open Source Resources For Web Developers & Designers: http://functionn.blogspot.com/2012/12/ttfjs-javascript-truet...

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

Re:ttf.js - A JavaScript TrueType Font Engine For Modern Bro... by resettarget on Wednesday December 05, 2012 @10:12AM (#4876554)
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.
Re:ttf.js - A JavaScript TrueType Font Engine For Modern Bro... by chj on Wednesday December 05, 2012 @09:12AM (#4876293)
very nice!