Connecting Tech Pros Worldwide Forums | Help | Site Map

User changing font on web

Newbie
 
Join Date: Feb 2007
Posts: 11
#1: Feb 17 '07
I'm trying to find out if there is a simple script or program out there that can change the font style dynamically on the web by the user. We manufacture products where there is an option of several different fonts and would like the ability to let the customer preview their text on line immediately. We have seen other sites doing this in both .asp and .php. Any help in the matter would be appreciated.

jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: Feb 23 '07

re: User changing font on web


This is actually very easy. The ASP way to do it is as follows, but Javascript might be faster.
Expand|Select|Wrap|Line Numbers
  1. <%
  2. if request("font") <> "" then %>
  3.    <p style="font-family: <%=request("font")%>">The quick brown fox jumped over the lazy dogs
  4. <%
  5. end if %>
  6.    Please choose a font:
  7.    <form action="thisPage.asp"><select name="font">
  8.       <option name="times">Times</option>
  9.       <option name="comic sans">Comic Sans</option>
  10.    </select></form>
  11.  
Of course this only works if the font is installed on the user's machine.
Newbie
 
Join Date: Feb 2007
Posts: 11
#3: Feb 24 '07

re: User changing font on web


This is similar to what I'm looking for. Many of the fonts we have won't be installed on their computers so they would have to be installed on my server. I really need this done quickly so if anyone has any insight or could do it for me I'd be willing to pay.
Newbie
 
Join Date: Feb 2007
Posts: 11
#4: Feb 24 '07

re: User changing font on web


Quote:

Originally Posted by rjw43

This is similar to what I'm looking for. Many of the fonts we have won't be installed on their computers so they would have to be installed on my server. I really need this done quickly so if anyone has any insight or could do it for me I'd be willing to pay.

Doesn't matter to me if it's in java but I would need them to be able to enter their text and preview it.
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#5: Feb 27 '07

re: User changing font on web


That is a trickier question. I'm not sure this is the best forum; ASP is sort of limited, and you really need more than scripting. I mean, it could be done, but it would probably be easier and faster through java or PHP. Anyone else have suggestions?
Newbie
 
Join Date: Feb 2007
Location: Newmarket, Ontario, Canada
Posts: 5
#6: Feb 28 '07

re: User changing font on web


I think you will have quite the problem, I take it you do not want the user to get the font without paying for it. It could probly be done if the user was allowed to download the screen font first then play with it trought your site, but you will most likely want that font to expire or stop being accessable when they have finished playing with it.

Anyway you look at it, the client will not be able to see what the font can do without giving it to them to have on their system. The only other way I can think of is to perform a screen image capture on a system that has the font and then post that image for the user to see.

Thats all I can think of.
Reply