views:

52

answers:

1

Is there a way to embed a font in the html / javascript code? (everything in 1 html file)

+1  A: 

I think Cufón may be your best bet. Its font converter turns OTF, TTF, PFB, and PostScript fonts into JavaScript. You can also limit the converted fonts to certain glyph subsets to reduce file size. Read more here:

http://wiki.github.com/sorccu/cufon/about

Usually you'd want to include the resultant JavaScript files externally (to aid cacheing and ease development and maintenance), but for your purposes, you can just include it all within <script> elements in the HTML document.

Bungle