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








[...] The TTFTitles WordPress Plugin – Titel in Wordpress in beliebigen Schriftarten darstellen [...]
[...] TTFTitles This wordpress 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. [...]
[...] The TTFTitles WordPress Plugin @ WordPress Plugins 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. Tags: web dev wordpress plugin fonts design [...]
I am hoping someone will have an answer to this support question I posted at the WP board- http://wordpress.org/support/topic/332472?replies=1#post-1283631
it is for http://letterstobreathe.com – I am trying to find a way to make the ttftext work in a function for the top featured post carousel.
Other than that the plugin works FANTASTIC!!
Hi, i’m trying to remove the alt tag from ttftitles.php file, because i’m using ttf titles with the nice tool tips plugin, and the alt tag appears on internet explorer with nice tool tips description, and is strange. On mozilla doesn’t appear because alt doesn’t work on it, only title=”" tag.
Please, help, i looked for all internet, and didn’t find anything about it!
Regards!
I discovered how i do it! Just change the alt= tag to type=
=]
I’m using the plugin AnyVar on my wordpress site, and I wanted to style the variable with ttf_text, but the screen just blanks. Is there any way to make this supported? I tried using ‘[var]‘ but then all I got was [var] in plain text (in nice ttf font, though, of course
)
I’ll have to check in the WP code to see when shortcode replacement is done and see if there is a way to handle this.
Ok, great! Thanks for the quick reply!
Hi I’ve installed the- TTFTitles WordPress Plugin to my wordpress blog but can’t figure out how to make it work. I don’t know how to program or write in HTML- could you please send me directions that a non-IT person could understand to use this plug-in.
Thank you in advance.
[...] TTFTitles [...]
Hi,
I have added TTFtittle plugin in my site.But i could not apply the font for common page header menus and page content.I have used the following code for page menu
can you help me for work the font menu
-welkins
Hi,
I have added TTFtittle plugin in my site.But i could not apply the font for common page header menus and page content.I have used the following code for page menu
“”
can you help me for work the font menu
-welkins
[...] The TTFTitles WordPress Plugin – A plugin to let you swap out your post titles with dynamically-created images. [...]
Hi! great plugin by the way…
Was just wondering if there was a way to have a different style attached to individual titles, in the sense that I have 5 styles, and I would like to specify for a specific post what style I would like the title to be. I would basically like to have a different style for every post that I have on my blog. Is this possible? Or does the plugin change the style for the whole blog.
Hope I am clear enough, thanks for your time!
[...] TTFTitles [...]
I need some help with ttf plugin.
I loaded a font but accents and special characters are not working. A rectangle is appearing instead.
I am sure the font has those special characters.
Any idea? Pls write me to gon.soto@gmail.com
thanks a lot!!!
great plugin. unfortunately the font doesnt turn out the way it should. its a little blurry and crooked…do you know how to fix that ?
Hello!
I have problems with plugin ttf titles. The whole background is black … Can not find the error. Someone who can help me?
Regards
Such a handy plugin, just one glitch for me – when I go to view my site in Firefox the title showcases an ugly black border round the edge – any idea how I get rid of this?
Thanks,
Anna Jane
Hey again, jrrl – just wondering if you had any news on the decenders issue or an update/fix for that?
Thanks!
Hi!
I’ve been using this locally with MAMP on my mac, working beautifully. But now that I moved everything to my webhost, I get black backgrounds no matter what I set in “styles”. What could be causing this? I know my host uses PHP safe mode. Is this the problem? The color of the font gets the right color, but the background is black, even with bg transparent setting “on” or “off” with bg color specified “#ffffff”. Tried both PNG and GIf, no difference. What can I do?
Your download link isn’t working!!
True Type Outlines, as shown in font preferences, with .ttf extension – is that a real TrueType Font? I’m having problems creating Polish characters work, despite the font does include them.
I have no idea what the problem might be. Do you have any hint?
regards
[...] 首先,請到官方網站下載ttftitles。 把檔案解壓,放到wp-content/plugins的目錄下。 在wp-content/plugins/ttftitles的目錄中,找到fonts。這是你放置字體的地方。 預設是一大堆字體,不過貌似沒有中文字體OTL [...]
[...] Also meaning you will start to get search engine traffic for the context of the comment.21. TTFTitlesThe TTFTitles plugin is another dynamic text replacement plugin that lets you replace your headers [...]
[...] TTFTitles Wordpress Plugin [...]
Hi,
I was trying to implement the TTF Titles plug in but I am running into two problems:
1) every title now has a black border around the title graphic
2) occasionally in the title i get a weird character (a box with an x in it). I have double checked to ensure not weird characters are in my post titles but nothing is off and the problem seems inconsistent
I can provide a screen shot if that helps.
Thanks.
[...] TFT Titles – Mit diesem Plugin werden eure Post-Überschriften in Textdateien umgewandelt, sodass ihr Schriftarten nutzen könnt, die euer Besucher nicht installiert hat. [...]
[...] kung anong gamit ko dun sa title image ng post ko sa taas. Im using this wordpress plugin – (TTFtitles) . nweis yun lang, wala na ako makwento. 96 days na lang manganganak na [...]
[...] a violar y a comerse tus ojos</p> O que te cuesta usar el plugin de la imagen (TTFTitles): The TTFTitles WordPress Plugin @ WordPress Plugins CSS 3 Embedding Fonts: Font embedding with css: the @font-face selector … and more [...]
Hi,
nice plugin!
I changed the line 801 and 938 a little bit to add text for screenreaders and robots:
return “$text” ;
add this to your css-file:
.ttf_hidden {display:none;}
I hope to see this in your next version so that i can use the auto-updater in the future…
Jörn
[...] TTFTitles [...]