Page 1 of 1
using php to allow a user to change fonts
Posted: Thu May 21, 2009 9:27 am
by imisspla07
I have been scouring the web for a way to allow a user to write something in a box, pick a font, and show what was written in that specific font. It seems that php is the way to do it, but I can't seem to figure it out. I know javascript and html ok, but know nothing about php and was wondering if anyone could help me without me having to go to B&N and buy an $80, 600 page book on php. Here's a site that does what I'm attempting to do.
http://www.1001fonts.com/font_details.html?font_id=3101
My wife makes handmade gifts and monograms them and I wanted people to be able to see what they want monogrammed in the font they choose.
Thanks.
Re: using php to allow a user to change fonts
Posted: Thu May 21, 2009 9:42 am
by jaoudestudios
Yes, just adjust the CSS accordingly.
This can be achieved by changing the CSS file to become a .php file instead of .css, but inside the file you can get php to generate CSS, just as it can generate html.
Re: using php to allow a user to change fonts
Posted: Thu May 21, 2009 10:41 am
by Benjamin
I recommend using images for this. If the user doesn't have a font installed, a different font will be displayed. Font sizes can vary, and in the end the customer might get something different then they expected.
Re: using php to allow a user to change fonts
Posted: Thu May 21, 2009 11:28 am
by jaoudestudios
astions wrote:I recommend using images for this. If the user doesn't have a font installed, a different font will be displayed. Font sizes can vary, and in the end the customer might get something different then they expected.
Good point!
Re: using php to allow a user to change fonts
Posted: Thu May 21, 2009 11:29 am
by jaoudestudios
You could use flash/flex just for the text, then it will be vector based and will resize better than a image. You might be able to achieve what you want with SVG.