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.
using php to allow a user to change fonts
Moderator: General Moderators
-
imisspla07
- Forum Newbie
- Posts: 1
- Joined: Thu May 21, 2009 9:23 am
- 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
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.
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
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.
- 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
Good point!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.
- 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
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.