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








Just a short question: How do I remove the link from the titles?
css :
a img{border:0;}
or just remove the complete thing if you just dont want to link to your article.. (why should some one do that?)
I’m trying to use the plugin on a site, but I only get an outline of the font and the characters are not completely filled in. I’ve tried several different fonts, but nothing changes.
I can view the default examples they way the come with the plug-in though.
HELP!!!
[...] TTFTitles [...]
[...] TTFTitles [...]
[...] habe ich gestern noch ein wenig am Blog gebaselt und endlich das Plugin TTF Titles eingebaut. Es zaubert individuelle Überschriften, auch wenn diese Schriftarten nicht vom PC des [...]
[...] TTF Titles How I got the font that I downloaded as my title type. Now I can incorporate the titles into the design a little better and I’m not restricted to using the plain jane fonts that everyone (maybe) is sure to have on their computer. Angelica rocks for giving me the link to it. [...]
I wanna try this for update image header in my blog. thanks for your wp project
Hi everyone, I have been using TTFtitles for long time with no problems at all.
but I will like to have more accurate antialiasing when using transparent backgrounds.
Is it possible?
[...] El plugin de WordPress TTFTitles – Un plugin que le permiten intercambiar con sus títulos post con imágenes dinámicamente creadas. [...]
it would be cool if the plugin would support assigning fonts to classes as well.
Great plugin! You know what would really be the icing on the cake for this plugin? A short code that would allow you to insert this into posts.
I would love the ability to change my h2 and h3 tags into a fnacy suitable graphic.
Nice work, thanks!
all backgrounds for my titles are black, even in the control pannel..
i’ve come across this problem a lot while googling for it but never found a suitable answer.. anyone? thanks..
[...] Find at: TTFTitles [...]
[...] The TTFTitles WordPress Plugin – A plugin to let you swap out your post titles with dynamically-created images. [...]
Would love to figure out the coding for figuring out how to use the tftitles for the authors name below each post! Any ideas?
Love the plugin, but I have a burning question: is there any way to turn off hinting (or specify the letter-spacing) for this plugin?
How to set the bg_image property? I always get “could not read image ” – where should I put the image file and how to point to it ?
[...] you wanted them to see. That plugin hasn’t kept pace with WordPress’s new releases. But TTFTitles has. It’s a great plugin, quite similar in operation to Image Headlines. The author is quite [...]
[...] Palette, itself, uses a “hack” of sorts — we use a WordPress plugin called TTFTitles which converts letters into images and renders the words as transparent pngs). Now we don’t [...]
[...] Palette, itself, uses a “hack” of sorts — we use a WordPress plugin called TTFTitles which converts letters into images and renders the words as transparent pngs). Now we don’t [...]
[...] be stored on your readers’ computers. Between all of the helpful advice John provides on the plugin’s homepage, and a timely, kind word of advice from RT Richardson at ‘GothchiC-omic.com’ who I [...]
[...] 官方网站支持:http://www.hostscope.com/wordpress-plugins/ttftitles-wordpress-plugin/ 由admin发表于 10 四月 6 3 评论 标签 : WordPress 相关文章推荐一款Wordpress博客主机 本站正在使用的用.htaccess缓存图片 提高Wordpress运行速度关于使用Wordpress建博的几点感受 [...]
[...] TTFTitles [...]
Hi, thx for the plugin&article, seems great.
However, one feature request: is it possible to include a rotation variable? For instance, 90: would rotate it 90 degrees, making a vertical bar (something i need @ the moment).
Plz let me know whether u implement it! Thx anywayz!!
[...] TTFTitles [...]
You did a fine job building on the old Image Headlines plugin. Far more user friendly. There is one thing I hope you didn’t take out though.
The original plugin would allow you to use the images anywhere. In my case I’d like to use it for my blog title image. Is this still possible?
[...] “http://www.hostscope.com/wordpress-plugins/ttftitles-wordpress-plugin/ “> TTFTitles TTFTitles is another plugin dynamic text replacement that you replace your head with images using any TrueType font, you can choose. It is mostly a reworking of the image plug-News. Its WP 1.5.2 to 2.7 was tested. [...]
[...] not be stored on your readers’ computers. Between all of the helpful advice John provides on the plugin’s homepage, and a timely, kind word of advice from RT Richardson at ‘GothchiC-omic.com’ who I noticed had [...]