473,395 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

User changing font on web

11
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.
Feb 17 '07 #1
5 1095
jhardman
3,406 Expert 2GB
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.
Feb 23 '07 #2
rjw43
11
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.
Feb 24 '07 #3
rjw43
11
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.
Feb 24 '07 #4
jhardman
3,406 Expert 2GB
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?
Feb 27 '07 #5
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.
Feb 28 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Cengiz Ulku | last post by:
Hi all, I know now how to change the font name of a RTF file in a RTB control using, for example: RTextBox1.SelFontName = cmbFonts.Text I have a RTF file -created with Word- displayed in a...
0
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. ...
11
by: trinitypete | last post by:
Hi all, I have a user control that uses control literal to build a heading with a link, and a div containing links below. As the link heading is hit, I want to change the style of the div,...
3
by: Sakharam Phapale | last post by:
Hi All, I am using a richTextBox control for text editing purpose. I have written following procedure which change the font style of richTextBox. Dim f as font = rtbData.selectionFont() ...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
7
by: Jason | last post by:
I have created a user control, MyControl.ascx, that has a text box and a button. The button updates a table in SQL with the text in the textbox. Now, I include that control in a page...
1
by: Blasting Cap | last post by:
I am having trouble changing the font for a PushButton control in a datagrid button column. I have seen several posts refer to styles and simple changes to the HTML for font changes but most of...
40
by: Paul Davis | last post by:
Hi all, I'm building some style sheets and trying to play the old game of balancing designer pixel perfection and still allowing users to adjust their font sizes. The compromise I've made with the...
0
by: nitehawk416 | last post by:
I want to change the font of my rich text box to a font I downloaded. In the properties the font isn't there, so I tried changing it through the code with this variable declaration Font MUDFONT =...
6
by: andrew.ames | last post by:
Hi I have a pretty basic windows application created in Visual Studio 2005 and VB.NET. I set my Form's font to Arial 8.25pt, so when i added a label and a button they automatically have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.