I am working on a site with a type designer. He doesn't want his fonts on font resellers and would like people to buy his own font on his site. He would like a web app that shows the live font and would also allow people to type in a input box to generate there own words with the font. Just like myfonts and other font websites have. How can I do this? JavaScript/jQuery if possible, or PHP.
If the designer doesn't want people to be able to download the font without payment, JavaScript and CSS fonts wouldn't work as the font is sent to the client.
With PHP it's easy and possible, for example, to use the imagettftext
function to render text in a font on the server, then send the rendered image as a reply to a HTTP request. imagettftext
uses the GD and FreeType libraries, and should work without any extra setup on most PHP installations.
You have a couple of options...
You can use sIFR
library to use custom fonts on your webpage. It uses JS and Flash.
You can create in the beginning sample text and with JS connect it to some textarea to live update sFIR object.