Jump to content

How to display font samples?


simcoweb

Recommended Posts

I'm in the process of creating a font display and download system but haven't any idea what is used for creating the realtime font examples where people type in some text in a form field and the text is displayed in the font they've chosen to sample. Here's a link to an example:

[url=http://fontso.com/font-preview.php?f=99666]http://fontso.com/font-preview.php?f=99666[/url]

Anyone have any idea what programming language this is done in?

Link to comment
https://forums.phpfreaks.com/topic/19700-how-to-display-font-samples/
Share on other sites

AndyB, but in that example url I posted it doesn't appear to be using an image. It appears to be a textarea type display. In the font listings where it has 'Sample Text' next to each one I would assume that's using the GD library method. But the dynamic display of a string of text typed by the visitor is something else i'm assuming?
Page 2 of the tutorial shows an image - http://www.phpfreaks.com/tutorials/105/1.php

The 'trick' is to have a simple form where the user selects a font and enters some short text and then pass the form entries to a script that retrieves the passed data, puts the font selected and the text string into the correct variable names and calls the image output.  It's simple stuff once you get the hang of it.
Ok, cool. Just another note on that.. the sample url I pointed out...there's no submit button in the text field. The sample text being typed in just automatically displays in the large text area box. I can see it's an image now by right clicking on it (the displayed sample text). There must be some code that detects if the text field has anything present then goes ahead and displays it after a specific time delay. Any thoughts on that?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.