using php to allow a user to change fonts

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
imisspla07
Forum Newbie
Posts: 1
Joined: Thu May 21, 2009 9:23 am

using php to allow a user to change fonts

Post 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.
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: using php to allow a user to change fonts

Post 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.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: using php to allow a user to change fonts

Post 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.
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: using php to allow a user to change fonts

Post 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!
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: using php to allow a user to change fonts

Post 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.
Post Reply