Improve Windows Type Rendering With ttfautohint

In a stroke of genius, Werner Lem­berg has started the ttfau­to­hint project, which repur­poses FreeType’s auto­hint­ing sys­tem to auto­mat­i­cally hint True­Type fonts for improved Win­dows ren­der­ing. While no auto­hin­ter will be able to match the eye and skills of a man­ual hin­ter, ttfau­to­hint pro­vides real world improve­ments, some­times dramatically.

For exam­ple, I’m work­ing as a con­trac­tor on a project using the clas­sic VAG Rounded font. 13px bold looks great in Pho­to­shop comps and Mac browsers, but fails hor­ri­bly under Win­dows. I decided to run VAG Rounded Bold through ttfau­to­hint 0.2 to see if it would offer improve­ments. In short: wow. In the screen­shots below, ttfau­to­hint goes head-to-head with the Fontsquir­rel gen­er­a­tor’s auto­hint­ing (which I believe is pow­ered by Font­Forge).

Ren­der­ing modes are shown in the cap­tions. Click for full size. (I’m restricted to screen­shots because the font is only licensed for the client site.)

Stan­dard (grayscale)

GDI ClearType

DirectWrite ClearType

As you can see, there’s a dra­matic improve­ment in all 3 Win­dows ren­der­ing envi­ron­ments. 11px-13px sizes move from awful, with com­pletely closed coun­ters, to supris­ingly read­able. At 14px, the coun­ters open up with stan­dard hint­ing, but closer inspec­tion reveals other defects such as no sep­a­ra­tion between the body and dot of the i and j char­ac­ters. The improve­ments are even more dra­matic under Stan­dard (grayscale) antialias­ing, which looks ter­ri­ble below 18px. Even under DirectWrite ClearType, ttfau­to­hint pro­duces supe­rior results (although a true test would also pro­vide a com­pletely unhinted ver­sion to see what the DirectWrite ras­ter­izer is capa­ble of on its own).

The only real down­side is a mod­est file size increase. I haven’t tested across mul­ti­ple fonts, but in this case our font jumped from 49kb to 63kb. I con­sider it an excel­lent trade-off for such improved rendering.

So, you want to use it? Well, first you should sup­port the project. Cur­rently you need to com­pile ttfau­to­hint, but with our sup­port, Werner will build a GUI ver­sion for the com­mand line-phobic. If you’re on a Mac and want to com­pile, I put together an instal­la­tion script.

Edit: In an email exchange, Werner pointed out that Dave Cross­land—who has done much of the ttfau­to­hint promotion—had the actual idea to use FreeType for hint­ing, although Werner still deserves mas­sive praise for the exe­cu­tion. Werner also pointed out that VAG Rounded is a good show­case font, and that ttfau­to­hint will not per­form such strik­ing results in all circumstances.