No, this is not one of those charity posts. It’s all about my favourite plugin. Imagine a plugin that could improve the typography of your page with no complicated setup. Controlling type online can at times be difficult. However, things have just gotten a whole lot easier with the release of the Typogrify plugin. Originally released by Christian Metts for Django, it uses among other things John Gruber’s Smartypants engine (that converts straight quotes to curly quotes, double hyphens to em dashes [—], etc.).
Shaun Inman developed the widont plugin for WordPress. Hamish of hamstu.com, decided to go the whole hog and port Typogrify to PHP, making a WordPress plugin out of it. I would have reviewed it sooner, but I wanted to be sure that it did what it says on the “box”. I’m pleased to say that it works like a charm, and I would recommend it anyone and everyone.
I won’t go into the details of how it works, but basically this is what it does:
- Fixes widow: basically puts a non-breaking space [ ] between the last two words of a paragraph, thus in effect gluing them together and forcing them onto the next line;
- Sorts out quotes, so that you’re never left with curly quotes that point the wrong way;
- Turns ellipses into entities. So those three dots (…) become a real ellipsis […];
- Wraps ampersands (&) in class = ‘amp’. Why? So that you can easily style them;
- Wrap multiple adjacent capital letters (all cap’s) in class = ‘caps';
- Make those who use it more attractive to the opposite sex; Hamish is still working on this beta feature request.
And if you don’t think typographic orphans are serious enough to worry about, then think about the kids! The child on the left is looking at a paragraph with no orphans; the child on the right has just seen a widow.
Something I’d really like to see for the future of this plugin, is more multilingual support. Every language has some of its own unique typographic conventions; and what’s considered “correct” in German or French, isn’t so in English.
I like the features panel and, in particular, the ability to surround em dashes with a thin space. It’s a great idea to have as an option, as this is a subjective stylistic choice.
And finally, you don’t even need WordPress to use it. Download the plugin and check the readme file for instructions on how to use outside of WordPress.
Let me know how you get on with it. A big thank you to Hamish for all the work he’s put into this. Porting a plugin is about more than simply re-writing code in another language. He’s done a great job.
If you can think of additional features you’d like to see, why not leave a comment here or on the original post.