views:

413

answers:

2

I've been trying to research a safer way to implement Cufón that would store the actual font data in a MySQL database that could be queried and returned when necessary, without having to store the converted .js file on the server (and break EULA).

Is this even possible? I'm still in the beginning stages of testing this out.

I've already implemented this solution for now, combining @font-face and Cufón. http://kilianvalkhof.com/2009/css-xhtml/combining-cufon-and-font-face/

+1  A: 

Cufón needs VML/Canvas points data about the fonts it'll render, and it gets that from a static JS file. This is essentially the definition of the font. Storing that data somewhere else (in a db, for example) and delivering it in another way (e.g. JSON) does not in fact "get around copyright"; you're still distributing the font data in a potentially unlicensed way.

Like this guy says (see "My thoughts on Cufón" on that page), I'd be careful about using Cufón with anything other quickie non-commercial sites, or even better, only with fonts I actually have rights to use.

sigint
I agree that it does not avoid the copyright, but if you have a secured db where people can't just hit a hosted .js file the font itself should be much more secure from prying eyes. I'm still working on the code testing this out (hence no answer, but thanks). Also, in the particular case I'm working with here, the two font files being used are both completely free.
Jeff Wain
A: 

Well I've basically found that there is no way to do this since the parsing of PHP and JavaScript/HTML take place at two different points, so there's no way to translate stored data back to be parsed as Cufon text.

It looks like it might be possible using ASP, but I don't have any method of testing this theory out.

Jeff Wain