6 ms·
What's happening here is freetype2 (and to a greater extent Windows) are grid-fitting the fonts. They anchor the font to the nearest pixel via a rather complex
by sitharus 14y ago
What's happening here is freetype2 (and to a greater extent Windows) are grid-fitting the fonts. They anchor the font to the nearest pixel via a rather complex algorithm, and then anti-alias that. You can see exactly what's happening on Windows by turning off ClearType.
This results in a font that is sharper on screen, but is more jagged and doesn't resemble the print counterpart quite as well.
MacOS on the other hand renders the font as it would for print - ignoring pixel boundaries - then antialiases that. On low DPI screens this results in a heavier feeling font, and some times artefacts where parts of the font get blurred out, but there's less difference between screen and print.
This was more useful when Macs were used heavily in pre-press, you'd want your display to match the print so you can avoid making proofs.
A few fonts include pixel alignment hints which Windows (but not freetype unless you compile yourself - Apple has patents on this) and MacOS can use to make a nicer alignment on screen, but since the libraries got better at auto-fitting these have dropped away. Take a newish font and put in on Windows XP with ClearType off to see how bad XP's was. Vista was better and 7 is pretty similar to MacOS when there are no hints.
It's not so relevant these days, but I don't imagine Apple changing. I'd expect Apple to move to high DPI screens over the next few years where this isn't an issue.
- arunoda 14y agoVery informative. Thanks.
- wtallis 14y agoIIRC, the TrueType hinting patents have all expired, so FreeType enables it by default now. Whether that looks better than the auto-hinter depends a lot on the specific font file.
- ch0wn 14y agoI think this still depends on the distribution. Fedora, for example, still contains a freetype version with the hinting patch disabled. You need to install freetype-freeworld from a third party repository to enable it. You're right, though. The patents expired in May 2010. [Edit] Source: http://www.freetype.org/patents.html http://www.freetype.org/patents.html
- micampe 14y agoAlso, you can disable/reduce hinting on Ubuntu/Linux to get a rendering closer to OS X, which I’ve been doing since about Gnome 2.0.
- mistercow 14y ago>This was more useful when Macs were used heavily in pre-press, you'd want your display to match the print so you can avoid making proofs. It's also useful if you just prefer it that way. Strong hinting discards most of the original character of the font, but a lot of people find it easier to read. I think strong hinting looks like garbage, but this is a matter of opinion.
- ajross 14y agoClearly it's a matter of opinion. But I don't think your explanation makes any sense -- surely the presence or absence of a clear edge to the outlines is part of the "character" of the font too, no? The font designers didn't intend for it to be blurry...
- mistercow 14y agoWhat I mean is that hinting reduces the distinctions between fonts far more than mere antialiasing does. Or, equivalently, hinting discards more information.
- elektronaut 14y agoAbsolutely agree. I prefer the OS X rendering in all of these samples. On the Gmail screenshot, the capitals look vertically squashed and 'i' and 'l' are almost impossible to discern. The letter shapes improves at title size, but the letter-spacing is either too wide or too tight.
- sitharus 14y agoIt's also my preference but I tend to sit further from the screen than most people I know who use Windows. I find it easier to read from my preferred distance.
- threedaymonk 14y agoI believe you're correct: OS X doesn't employ hinting at all, whereas Ubuntu does by default. Indeed, if you set hinting to "None" on Ubuntu (this is how my computers are configured), you get very similar results to OS X. I think it's largely a matter of preference: I prefer anti-aliased letters of the right shape, and find the distorted grid-fitted letterforms of Windows almost unbearably ugly, yet others complain about the "fuzzy" fonts on OS X. Luckily, I use a system that lets me choose!
- duaneb 14y agoUhh, OS X has always had hinting; however, it doesn't use the hinting included in the font.