The TTFTitles WordPress Plugin
This plugin lets you use images to replace the titles of your posts, thus circumventing the problem of guessing what fonts your end-users might have installed.
This is primarily a reworking of the Image Headlines plugin by Brian “ColdForged” Dupuis, so that it would work in WordPress 2.3. Of course, THAT was a reworking of another plugin by Joel Bennett. Anyway, this plugin lets you replace text on your site (titles specifically, but you can actually replace just about anything) with atttractively rendered TrueType Fonts images.
The README file included in the zip archive explains some details of installation, such as permissions for the fonts and cache directories.
If you use this, I’d love to hear about. If you have problems, I’d love to hear those two. Feel free to leave comments here in either case.
Admin Interface
You get a new tab under Presentation called ‘TTF Titles.’ This has three subtabs: ‘Styles,’ ‘Cache,’ and ‘Fonts.’
In the ‘Styles’ tab, you can define different text styles. A style includes the font, size, color, shadow, spacing, etc. The styles you define here will be used in template tags in your theme files.
In the ‘Cache’ tab, you can set a few particulars about the image cache, basically where it is and how long images last before they expire.
In the ‘Fonts’ tab, you can install fonts, view those already installed, and delete ones you no longer need.
Template Tags
There are two template tags you can use to actually make the text images show up:
<?php the_ttftitle(before, after, display, style, overrides); ?>
<?php the_ttftext(text, style, overrides); ?>
The tag ‘the_ttftitle’ can be used to replace ‘the_title.’ The first three arguments for the_ttftitle are the same as for the_title. The tag ‘the_ttftext’ can be used to turn any chunk of text into an image.
The ’style’ argument should be the name of a style defined in the ‘Styles’ tab. You can use ‘null’ for this argument to use the default style.
The ‘overrides’ argument can be used to override any of the parts of the style. It should look like: name1=val1&name2=val2… The variables you can override are:
| Variable | Meaning | Example |
|---|---|---|
| font_name | the name of the font | Warp 1 |
| font_size | the font size to use | 24 |
| font_color | the color of the text | #FF0000 |
| bg_color | the background color | #FFFFFF |
| bg_transparent | make the background transparent? | true |
| bg_image | an image to put in the background | null or a filename |
| indent | indent of the first line | 5 |
| maxwidth | how wide a line can be… 0 for no limit | 500 |
| subindent | indent for subsequent lines | 20 |
| leading | space between lines | 10 |
| effect_type | what kind of shadows? | none, hard_shadow, or soft_shadow |
| soft_shadow_color | the color of the soft shadow | #000000 |
| soft_shadow_spread | how fuzzy the shadow is | 5 |
| soft_shadow_x_offset | horizontal offset of the shadow | 3 |
| soft_shadow_y_offset | vertical offset of the shadow | 3 |
| hard_shadow_color_1 | hard shadow inside color | #FFFFFF |
| hard_shadow_color_2 | hard shadow outside color | #000000 |
| hard_shadow_offset | hard shadow offset | 2 |
Styling the Images
Beyond the ’styles’ used by TTF Titles, you might also want to apply some CSS properties to the resulting images. To make this easier, the images are marked as belonging to the class ‘ttf’. This was added in 0.1.5, when I realized I wanted to style just the text images and couldn’t.
Updates
- 10/18 – 10:04 – Version 0.1.1 released. Added error suppression for when then font does not contain all the characters you need. Also updated README to be clearer when it comes to permissions.
- 10/18 – 10:13 – Version 0.1.2 released. Got rid of some pesky control-Ls in the code. My bad.
- 10/18 – 10:58 – Version 0.1.3 released. Removed call to str_split that was causing problems for some people.
- 10/18 – 17:20 – Version 0.1.4 released. Minor cosmetic change that should make things clearer when defining a new style.
- 10/23 – 19:31 – Version 0.1.5 released. Removed the ‘border=0′ from the img tags and added style=”ttf”. Who am I to say they shouldn’t have borders? Also, this makes them easier to style in general.
- 10/25 – 17:27 – Version 0.1.6 released. Small change to provide compatibility back to WP 1.5.2.
- 11/13 – 12:01 – Version 0.2 released. Added a ‘Usage’ tab and the letter_case style feature.
- 11/13 – 07:10 – Version 0.2.1 released. Fixed a really really sloppy bug. My bad!
- 11/13 – 07:58 – Version 0.2.2 released. Fixed an even dumber bug.
- 12/10 – 16:35 – Version 0.4.1 released. Should have been 0.4.0, but I messed up with svn check in. Added contextual help. Fixes a few bugs.
- 12/11 – 07:02 – Version 0.4.2 released. Fixed incompatibility with older PHPs








Hi. We are having a problem with punctuation marks. apostrophes, commas, ect. are not showing up but are just a red X. Any ideas?
[...] TTFTitles WordPress Plugin This plugin lets you use images to replace the titles of your posts, thus circumventing the problem of guessing what fonts your end-users might have installed (via hyperdjango). [...]
hi BYD! I think the problem is the font you are using not support punctuation marks, apostrophes, commas, ect. Example, my blog is in spanish but usually the fonts not support Ñ, then i have to choose a font with Ñ.
I am having major problems with this plugin.
It worked fine until I changed the position of my blog. I have followed every instruction but I still get the message: Cache directory “/customers/(mywebsite)/(mywebsite)/blogg/wp-content/plugins/ttftitles/cache” is not writable.
I have changed all options for the folders to make them writable but there must be something wrong with the link above?
Best regards, Josefin
Hi…this plugin has worked beautifully since I first installed it a couple of years ago, but I just noticed that now the bottom part of p’s and g’s are being chopped off. Any letter that drops below the line is problematic. Any thoughts? Thanks…Jan
Hello, this is a very nice plugin, thank you!!!!
I have the same Problem like Chris “Could not read image “
And i don`t know why!
The path to the image is working, but the Plugin cannot finde it!
Please help me!!!
Hugs, Trinity
I am trying to get this plugin to all images to the top menu and also the titles in the sidebar (on a widgetized sidebar). Having read the comments here I was wondering if this problems have been sorted out yet.
[...] TTFTitles [...]
[...] TTFTitles [...]
[...] TTFTitles [...]
[...] TTFTitles [...]
[...] TTFTitles [...]
[...] TTFTitles [...]
[...] TTFTitles – Headlines in beliebigem TTF-Font http://www.hostscope.com/wordpress-plugins/ttftitles-wordpress-plugin/ Tweet This!Share this on TechnoratiSubmit this to NetvibesAdd this to Mister WongMark this on [...]
[...] The TTFTitles WordPress Plugin – A plugin to let you swap out your post titles with dynamically-created images. [...]
[...] TTFTitles [...]
[...] TTFTitles [...]
Well, since I’ve had too many tries without any luck and no (useful) answers to my questions about changing other parts of text with TTFTITLES, but with a deadline to catch, I decided to leave this plugin for what it is and look for something else… GLAD I found a nice little script which (for me) works better and easier than the TTFTITLES.
I have used the TTFTITLES for quite a few years now, but since I sometimes need to change other parts of text/code with the replacement font , which has never worked out for me, I started to look for something else… The TTFTITLES in general works fine, but not anymore for my needs, at least not with my knowledge. I started looking in other places and came acros Cufon.
I can recommend CUFON. This is similar to SIFR, but without the use of flash and without the hassle.
Visit: CUFON. and download the needed javascript.
Throw the replacement font you want to use through the generator and download the generated javascript file.
Upload the javascript(s) to your server, point to the javascripts in your header.php and add this line to your header:
`
Cufon.replace(‘h1′);
`
Where “h1″ is your part you would like to see replaced with the chosen font. Copy/paste the above snippet and add other CSS classes to it and it will automatically replace those classes with the replacement font you chose.
Easy as 123!
Hope this helps other people who are having troubles replacing other texts than post titles on the website. You can simply add the CSS class and it will replace the font of that class or ID with your replacement font.
Cheers!
Oddly, I have not seen a single one of these “too many tries” to get help. Styling things other than the title is easily done with the_ttftext which is mentioned on this page (although perhaps not very documented). If you’ve found CUFON to be a better fit for your project, that’s great for you, but I’d prefer it if you didn’t spam my pages with accusations of lack of responses and a clear promotion of your tool of choice.
[...] TTFTitles [...]
[...] The TTFTitles WordPress Plugin – A plugin to let you swap out your post titles with dynamically-created images. [...]
Hey! Whassup?!
I’m having a problem with lowercase “p”, “y”, “f”… The image simply cuts them. How am I suposed to fix this? Can you help me?
[...] TTFTitles [...]
[...] om laten zetten naar een plaatje met een lettertype naar eigen keuze. Een geweldige plug-in van John leavitt. 7. Standaard worden je categorieën geordend op alfabet. Wil je hier zelf een keuze in hebben dan [...]
[...] elements, like drop caps and pull quotes, to your posts.Wordpress Plugins For Better ReadabilityTTFTitlesThe TTFTitles plugin is another dynamic text replacement plugin that lets you replace your headers [...]
[...] TTFTitles [...]
[...] TTFTitles [...]
[...] TTFTitles [...]
[...] The TTFTitles WordPress Plugin @ WordPress Plugins [...]
My font supports apostrophes, etc, but the plugin is not displaying them. Bug? Would love to be able to use this plugin but I see this as a significant deficit.
Is it a TTF font or an OTF font? There have been some problems with OTF fonts. If it is a TTF font, could you tell me which font it is? Thanks.
[...] TTFTitles is the plugin to use if you want interesting post titles. Truth be told, you’re not actually adding a new font to your blog. Instead, this plugin generates an image from an online font database, and uses it as the title of your new post. While you’re not generating a custom font on your own blog, the visual effect is exactly the same. Great design is all about creating attention, and this plugin will surely have your visitors talking. [...]