Page 1 of 1

Replacing header text dynamically with any font you want

Posted: Wed Feb 07, 2007 5:27 pm
by Andor
Just wanted to point your attention to a solution for replacing text dynamically with any font/typeface - in headings, for instance.

For several months I've been thinking of ways to have my headings look more interesting than just using standard fonts and maybe adding an interesting background pic. It's always possible to create pictures files for the text itself, but it's a lot of work for a site with expanding content.

At 'A List Apart' I found a solution. Two scripts - php and js - turn your headings into png-pictures based on the font file (.ttf) you pick. It looks fantastic and works perfect for my needs!

You can test the solution with this link where I just added the text to be replaced directly in the url.

Here you can see it in action on my test site.

Have fun!

Re: Replacing header text dynamically with any font you want

Posted: Wed Feb 07, 2007 8:06 pm
by tsw
I think there are two modules for cmsms which do the same thing ;)

http://dev.cmsmadesimple.org/search/?ty ... rch=Search

Re: Replacing header text dynamically with any font you want

Posted: Thu Feb 08, 2007 12:46 pm
by Andor
I didn't know - kiitos!

I'll try it out - maybe it works even faster than the one I used ;)

Re: Replacing header text dynamically with any font you want

Posted: Thu Feb 08, 2007 1:20 pm
by tsw
Ole hyvä ;)


IIRC imagetext creates the image only when text changes (but dont quote me on that)

Re: Replacing header text dynamically with any font you want

Posted: Sat Feb 10, 2007 3:26 am
by carasmo
Thanks for posting this. I was thinking of using the SIFR (flash text replacement). I downloaded the modules and there's so many files, the one used for this original post uses only two files. I like that more. Less is more.

Thanks

Re: Replacing header text dynamically with any font you want

Posted: Sat Feb 10, 2007 2:20 pm
by Andor
Thanks, carasmo  -  I just love it, myself :)

I have also tried the CMSMS TruetypeText, which tsw mentioned, but have not been able to get it to work properly. It might be that I don't set it up right, but until now, I have had no luck. :'(