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
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?
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.