Gasp Tool Tests. No.1

The idea was to use Raph Levien’s Gasp Tool to test how upgrading a font’s gasp table can improve the appearance of unhinted fonts with the newest web browsers on Windows.

The gasp table in a truetype font contains information enabling the preferred rasterization techniques for the typeface when it is rendered on a digital screen. What the Gasp Tool does is strip a font of it’s gasp table, then generate 2 copies of the font, one having a version 1 gasp table with symmetric smoothing + symmetric grid fitting, and the other having a version 0 gasp table. i.e. only standard gridfitting + antialiasing. Finally the Tool generates a ‘test.html’ for comparing the 2 fonts from sizes 6pt – 36pts. It’s a very useful tool for comparing different rasterizations on a font. I used Gasp Tool here to help generate test sheets to study different gasp settings on hinted and unhinted versions of a font.

I used the Ubuntu Font as my test font as i know it has had a good deal of professional hinting/instruction work applied to it. The hinting process of the Ubuntu Font is highlighted here.

Before testing, the Ubuntu Font was stripped of all it’s truetype instructions and it’s gasp table was upgraded using FontForge. This unhinted version was then used in the tests alongside the standard hinted version of the font. An unhinted version of the Ubuntu Font was given a default (version 0) gasp table from FontLab and also included in the tests.

Browsers used were Internet Explorer 9 and Firefox 4 running on Windows 7 with ClearType enabled. The following fonts were tested.

1a. Ubuntu Regular. Standard release with full, high quality, truetype instructions and it’s original version 0 gasp table.

1b. Ubuntu Regular. Standard release with full, high quality, truetype instructions and it’s gasp table upgraded to version 1 with symmetric smoothing and symmetric gridfitting switched on.

2a. Ubuntu Regular. Unhinted version with gasp table set to version 1, symmetric smoothing and symmetric gridfitting switched on.

2b. Ubuntu Regular. Unhinted version with version 0 gasp table retained at a ‘Fontlab default’ setting.

Here are screenshots of the results;

Internet Explorer 9

The standard released font version. Manually hinted with ‘default’ old version GASP table.

All hinting instruction removed. GASP table upgraded to Symmetric Smoothing & Symmetric Gridfitting at all pt sizes.

Original hinting retained. GASP table upgraded to Symmetric Smoothing & Symmetric Gridfitting. at all pt sizes

All hinting instruction removed. ‘Default’ old version GASP table.

Firefox 4

The standard released font version. Manually hinted with ‘default’ old version GASP table.

All hinting instruction removed. GASP table upgraded to Symmetric Smoothing & Symmetric Gridfitting at all pt sizes.

Original hinting retained. GASP table upgraded to Symmetric Smoothing & Symmetric Gridfitting at all pt sizes.

All hinting instruction removed. ‘Default’ old version GASP table.

In the case of the Ubuntu Font tested here, the quality of the unhinted version is as good as the hinted version, it could even be argued that it is slightly better overall. It seems clear that with the rasterisation methods used by Firefox 4 and Internet Explorer 9 (DirectWrite), and looking only a little ahead, the hinting of fonts for use on the web becomes less relevant. With respect to this it’s worth considering the amount of work hours that went into hinting the Ubuntu font.

The old version ‘default’ gasp table enables antialiasing below 8ppm, between 9-16ppm Gridfitting is enabled, and above 16ppm both Gridfitting and antialiasing are enabled. This type of gasp table is a legacy from when low resolution screens and limited colour bit depths were the norm. It refers back to the original TrueType specifications, but it no longer helpfully applies to the majority of systems enabled to browse an image-rich web. It makes much more sense that designers creating fonts for web use, utilise version 1 gasp tables and steer clear of the old version 0 tables. Interestingly Fontlab is only able to set version 0 tables, and Visual Truetype defaults to the same old gasp table. Maybe this explains the continual widespread use of these legacy tables. Fontforge on the other hand can write old and new version gasp tables very simply. Alternative ways to upgrade an old gasp table is to run the truetype font through Gasp Tool or run the font through TTX and recode the gasp table by hand.

Leave a Comment

Your email address will not be published. Required fields are marked *