Forum Moderators: phranque

Message Too Old, No Replies

Changing Font Preview Text

         

webdizzy

2:03 pm on Jul 8, 2005 (gmt 0)

10+ Year Member



I wasn't sure which scripting forum, if any, this should go in, so I'll start here.

How I can enable site visitors to change sample text shown in different fonts, such as is done on most font sites, i.e. myfonts.com? I want people to be able to type something into a text box and have it appear on the page in a particular font so they can see how the text would look in that font.

Although I can install pre-written cgi and php scripts, I'm not a programmer. I need something that will walk me through it.

Thanks!

kaled

7:16 pm on Jul 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like a CSS (forum83) / javascript problem (forum91).

You'll need something like this I think :-
e = document.getElementById(idname);
if (e) e.style.color='blue';

Obviously, this doesn't deal with fonts, but I'm sure you get the idea.

Kaled.

webdizzy

7:37 pm on Jul 8, 2005 (gmt 0)

10+ Year Member



I think it's more of a server side image creation issue. The text typed would appear as a graphic of the text in the chosen font.

mogenshoj

9:10 pm on Jul 8, 2005 (gmt 0)

10+ Year Member



A server with php with gd-lib and freetype installed would do the trick.

As webdizzy wrote, server side image editing.

webdizzy

1:16 am on Jul 9, 2005 (gmt 0)

10+ Year Member



But, where can I find out how to use that stuff to do what I want?