skip to content

 Web design 

Database-driven systems

Easy-to-maintain web sites


 



Dynatext

Dynatext provides the ability to dynamically generate text for headers and other display text using a font that you specify / provide.

Features

  • Dynamically creates a .png file for the text that you specify. This avoids the extra time and effort to use a graphics program (like PhotoShop) to produce the header and move it to your site.
     
  • You can use whichever font you wish. You supply the font file (.ttf) so it doesn't depend on the availability of the font on the user's system.
     
  • The text is shadowed and can have a transparent background.
     
  • You can specify the font size and color.
     
  • You can control whether the header is rebuilt each time it is used or if it should use the one created previously (if it is found).
     
  • Since this creates a file (under a name you specify) once it is created, you can use it just like any other graphics file.

Notes

  • You can build this into your programs if you need to include dynamic/variable text (e.g. a date). If the text is relatively static, you could create a separate program to create your headers and just rerun it if there is a need for a change.
     
  • Most TTF fonts seem to work fine. There is a problem of some sort with the standard symbol fonts like Wingdings because they don't work. There are other free symbol fonts that do work.
     
  • I wanted to have a separate directory for fonts but I could not get this to work (and I did quite a bit of research and tried a number of approaches). Thus, the version that does work has the fonts in the same base directory as the program that includes the dynatext modules. It's a little bit messier but it works.
     
  • In the sample program (test_driver.php) I have included most of the parameters every time but they all have defaults so you may not need to specify all of them if you are happy with the defaults (look at the dynatext module).
     
  • My starting point was some work on this that you can find at http://www.alistapart.com/articles/dynatext. As far as I can see, the original work is public domain.
     
  • I am making this available as freeware with no warranty. It appears to work pretty well but it may be sensitive to your operating system and / or system parameters so it is possible that there could be problems in accessing or using the fonts file. Your system / server must have the GD library and the Freetext extension (on a Linux system). I had no problem running this on my Windows system using EasyPHP and the current version runs properly on my Linux server (which had the required libraries). 
     
  • Installation: Just unpack the zip file into the appropriate place and go. If you want to run the example, then unpack the sample fonts into the same directory as the test_driver.php program (or use your own fonts and change the program accordingly).
     

Click for a demo

Download dynatext

Download sample fonts

 
   

Powered by Website Baker,
Design by Innovations Design based on a template by gavjof