FancyText – or emulating text-rendering:geometricPrecision in Firefox 4

I just wrote FancyText, a tiny addon for Firefox 4 that emulates the text-rendering:geometricPrecision CSS directive.

It’s a bit of an hack because it does its thing by asking Firefox to rotate all pages by a fraction of degree. This rotation is not really visible but it’s enough to make Firefox stop using the hinting of the font, therefore yielding antialiased text with no hinting (i.e. geometricPrecision).

It’s worth noting that this method can be used also in normal webpages, because all it takes is adding -moz-transform:rotate(0.000575deg); where you would normally apply text-rendering:geometricPrecision;

If you’re on Firefox 4 on windows, you can see the effect of this method (and of FancyText) in this example. In each pair of lines, the top one is the normal Firefox rendering whereas the bottom one is as it appears with FancyText.

The quick brown fox jumps over the lazy dog 0123456789

The quick brown fox jumps over the lazy dog 0123456789

The quick brown fox jumps over the lazy dog 0123456789

The quick brown fox jumps over the lazy dog 0123456789

The quick brown fox jumps over the lazy dog 0123456789

The quick brown fox jumps over the lazy dog 0123456789

Bear in mind that this likely increase the CPU and GPU loads and that I tested it only on computers running Windows 7 with hardware acceleration enabled.

FancyText is available on AMO.