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








[...] 12. TTFTitles WordPress Plugin [...]
[...] 12. TTFTitles WordPress Plugin [...]
[...] 12. TTFTitles WordPress Plugin [...]
[...] folgenden Link kann sich das Plugin gedownloadet werden und auch eine kleine Anleitung steht Euch dort bereit. Bei [...]
[...] demais elementos você pode encontrar na página oficial do plugin: http://www.hostscope.com « NextGEN GalleryMédico e livros » Os comentários desse blog são MODERADOS, [...]
For some reason, my ttftitles have lost their descenders on the bottom line of the title. So if the title was “Happy To Be Here”, the parts of the p’s and the y that descend below the line will be cut off. Titles longer than one line will be fine for all but the bottom line. I lose descenders in both the blog and in the TTFTitles settings pages, and using all various fonts I have tried. The problem appears in the image source. Although I may have never noticed it, I don’t think that it was always there.
Setting the shadow of course helps, but not everything is shown even then.
It seems different from what Scott fixes (although I did try that). The gd-test.php says everything but T1Lib Support and JIS-mapped Japanese Font Support.
Anyone else seen this?
I created a work-around that set a hard shadow with white/white, and some offset that worked. It seems to add leading, but I can live with it. I also turned off wp-supercache so that I could make sure I got updated images. I’m not sure where to start for a fix, though. Otherwise, I’ve been loving ttftitles since it replaced image headlines. What I consider to be a “must have” plugin for any WP installation.
[...] here to see the original: The TTFTitles WordPress Plugin @ WordPress Plugins Tags: plugin Comments0 Leave a Reply Click here to cancel [...]
[...] 12. TTFTitles WordPress Plugin [...]
Hi I have the exact same problem as Forrest..My titles seem to cut off? They never used to do that..How can I fix this?
Ok, thx for delete my question, I even found a solution for embedding in the background.
http://utilitybase.com/paste/15382
text-indent:-9999px;
height:28px;
background-position:center;
background-repeat:no-repeat;
}
<h2 style="background-image: url();">
I don’t delete comments unless they look spammy (seems unlikely in this case) or look like gibberish in the admin interface (possible for things with code in them). If I deleted yours, I apologize. Thanks for the information.
[...] 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 guys, has anyone found out how to get the ttf working in the H2 area of the sidebar for ver2.8? I’m new to wordpress and have tried everything I can think of with no luck.
Thanks
@ben, did you try the_ttftext tag?
I love this plugin but it doesn’t seem to work on Firefox. Its fine on other browsers except Firefox. How can I fix this?
Hi there…I’m using a custom call to get a post to display within my sidebar. I’d like to add a custom value to that post named “title” (or something similar). That value for “title” i’d like to get parsed with ttfTitles and wrapped in a custom div, but can’t figure out how to get it to work.
My custom call is this:
post_content;
$content = apply_filters( ‘the_content’, $content );
print $content;
?>
ANY help in the right direction would be greatly appreciated!
Thanks
aaaargh..didn’t post the php:
* post_content;
* $content = apply_filters( ‘the_content’, $content );
* print $content;
* ?>
Hi Troy, I did, however, I may not have employed it correctly or in the right area. Most of my attempts was centred around the function.php file and the below code, but with no luck:
if ( function_exists(‘register_sidebar’) )
register_sidebar(array(
‘before_widget’ => ”,
‘after_widget’ => ”,
‘before_title’ => ”,
‘after_title’ => ”,
));
I have been trying to figure this out for about 3hrs now and I can’t seem to get my new font to display. I have the plugin installed and all is ell but I am unclear where I add the tags, Ive tried adding the “ttftitle” nothing happens what am I doing wrong. PLEASE help!
I activated the plugin, uploaded my font and so on. where do I have to change those template tags or how can I make the plugin work? I think I am too stupid to make it work. i would be so grateful to hear from you. thanks in advance!
Hi Jrll!
How can I do to set transparent background (using png) and not get a white irregular border?
Thanks a lot!
[...] ich mich heute für gabs nochmal mit dem plugin ttft-titel auseinander gesetzt habe, und ihr das ganze aufgeschrieben habe, dachte ich mir, ich poste es hier, [...]
Good Work!!
Thank´s very much.
I am using.
me
Hi jrll!, I wrote here a few days ago and maybe my comment was automatically delivered to spam or something.
Anyway here’s my “problem”: using ttftitles (PNG) I can’t get sharp edges with transparency enabled, Is there a way to fix this?
Thanks!
Holy WOW paginate your comments, mate!
But seriously, thank you so much for translating this to WP2, very helpful! If you’re still up for working on this, would you consider adding a new text style – Small Caps? I mean I could live without it, but sometimes I just don’t want my titles screaming at the reader OI THIS IS A BLOG TITLE nor do i want proper nouns not capitalised when i need them to be. XD
Bravo for this wonderfull plugin — which manage .GIF images.
Perfect ttf_text() function.
I only would like to report one bad thing:
I had to re-install my server, and forgot ti install GD lib for php, then it all just destroyed the plugin, and no error message where leading me to this…
Would be good if it does warn you about GD just like “TextImage” plugin does…
Thanks again a lot!
This still is a very usefull plugin!
Hello!
I’m trying to get this plugin working in Wordpress 2.8.2. It doesn’t display the fonts in the admin panel and when I add:
< a href="” rel=”bookmark” title=”Permanent Link to “>
(sans spaces ><) nothing happens but the posts no longer display.
Michelle-
Not sure about the admin font display (other than that I am sorely late in releasing the revised admin interface).
In the bookmark link, use the_title, NOT the_ttftitle. You only want to use the_ttftitle in places where the title is being displayed.
While I can get it to work on the rest of my site. it isnt working for the navigational menu I put on the top for my pages as the menu. I tried
and nothing. What am I doing wrong here?
Thanks
erm didnt let me post it
the_ttftext(wp_list_pages(‘title_li=&depth=1′ , false)); (of course I put the php and ?>
menu shows up. but only the original menu. not the ttf one
[...] fez a migração do meu domínio ontem para o php5 e ocorreram alguns problemas com o plugin TTFTitle (transforma o título do post em imagem, podendo assim utilizar diferentes tipos de fontes) e até [...]