To display text in ways not possible by today's browsers, you can use an image. Text can be formatted in an image editing program with fading colours, curved and whatnot. But to have a webserver automatically generate a textual image (or pictoral text, whichever way you look at it) when a special url is called for, gives a freedom unsurpassed.
A php script which outputs an image according to several parameters that are passed in the url, can be found at http://4umi.com/image/text.php and put to use like so:
The parameters that can be used, are:
| Parameter | Default Value | Remarks |
|---|---|---|
| text | Hello world. | Use '\a' to write an '@' |
| font | times | See the full list at web/font/ |
| size | 12 | in pixels |
| angle | 0 | 90 is straight up, -90 is down |
| color | black | hexadecimal code, 16 names or 'random'. |
| back | white |
The text can be slanted along all 360 degrees. Strings longer than 700 pixels (in any direction) may be cropped.
For colours the hexadecimal notation in #rrggbb format is used, although the hash (#) is optional. Both the color and background parameters can be set to 'random'. The script will then choose one from the 16 standard colours and make sure it is not the same as the other, but a proper contrast cannot be guaranteed.
The 16 named colours are:
| black | gray | silver | white |
| red | maroon | purple | yellow |
| green | olive | teal | lime |
| blue | navy | fuchsia | aqua |
The image does not exist until the script has built it, and the dimensions are not known until it is finished. Thus it is not possible to specify the width and height attributes in the HTML-code of the page where the image is to be displayed. This prohibits a proper validation of the document against the accepted standards set by the W3C, but in normal browsers the image will eventually display just fine.
Create your own imaged text by filling in the necessary details in the form below.