Typeface.js embed custom fonts with javascript
We have already known about the limitation of using custom fonts in our web design, and also there already some techniques to jump over the limitation. SIFR which is using flash font embed technique and Facelift Image Replacement (FLIR) using PHP GD dynamic image capability may the most famous among them, but now Typeface.js comes with different solution.
Typeface.js uses browsers’s drawing capabilites to draw text in HTML documents (Firefox, Safari, and Opera support the element (as well as SVG), and IE supports VML).
The Typeface.js project has two components: the perl module for converting fonts, and the javascript library for drawing in the browser. The perl module extracts glyph outline information from truetype fonts and writes that data in JSON format. The javascript library then traverses the HTML document and renders text using or VML to draw the glyphs.





That’s rellay shrewd! Good to see the logic set out so well.