MSDN Magazine > Issues and Downloads > 2005 > June >  { End Bracket }: It's Not Just Fonts
{ End Bracket }
It's Not Just Fonts
Bill Hill

Creating a typeface that's truly readable on a screen is much more complex than people realize. The average core font in Windows®, for instance, has about 25,000 lines of executable code as well as the outline and other data. The constraints are brutal. You just can't make the text bigger and use more pixels. Humans need body text that's between 9 and 12 points high (there are 72 points in an inch). Reading involves a high-resolution section of the human retina called the fovea, which is only 0.2mm in diameter. Physiology is the driver.
There are some general features every font must have, even for print. The top and bottom curves of lowercase letters like "o" are generally slightly higher and lower than the height of the "x". These "overshoots" and "undershoots" are necessary; otherwise the "o" would appear smaller, and the type would look rather odd.
You need to incorporate 5,500 years of learning when you design type. How do the letters fit together? Each glyph is designed with general spacing around it. But when you bring two specific letters together in a word, they often don't fit well. The classic example is a capital "T" paired with the lowercase "o", in the word "To". Such pairs of letters need special optical spacing and the pair-kerning data for this is provided by the font designer.
There are some pairs, or even triplets, of letters that won't fit well even with kerning (an adjustment to the space between characters). A kerned lowercase "f" and "i" usually clash because the dot above the "i" collides with the top of the "f". They're normally replaced with a new character for the "fi" combination, called a ligature. There are common ligatures for fl, ffi, ffl, and so on, as well as more arcane ligatures in some fonts (for instance in Palatino Linotype, one of the core fonts in Windows) for combinations like "ct", "st", and "Qu".
Figure 1 "f" and "st" Ligatures in Palatino Linotype 
When it comes to the screen, which is much lower resolution, you can't easily fit complex letter-shapes into its coarse pixel grid. Mapping the outline shape to the grid causes rounding errors; some pixels get turned on when they should be off, and vice-versa, and the text is awful to read. So the rasterizer, the code that turns outline data into pixels, needs a lot of help.
The solution is font hinting, a set of programs that manipulate the outlines so the right pixels get turned on. Hinting is really a hierarchy of programs; at the highest level you have global hints, which keep stem weights uniform across a font, or harmonize across a family, so the Bold weight of the font has a constant relationship to the Regular weight, going all the way down to very specific instructions (known as delta hints). These can be as specific as "in this font, at 10-point on a display of 100ppi, turn on this pixel in the lowercase 'a'..."
Many of the problems associated with displaying readable type on the screen are dramatically reduced by ClearType®, which Bert Keely, Greg Hitchcock, Mike Duggan, and I invented back in 1998. Font hinting has become simpler in many ways, and now needs a lighter touch. ClearType has evolved a lot over the years, and the latest and best version of it will ship as part of "Avalon," the code name for the presentation subsystem class libraries in WinFX. When the next version of Windows, code-named "Longhorn," ships, it will contain seven new fonts, specially designed to take maximum advantage of ClearType. There will be six new fonts for Latin-based languages—including a brand-new monospaced font, Consolas, designed to make your lines of code much easier to read. They've been created by some of the world's top font designers, and hinted to the highest standards possible.
There's a new Japanese font called Meiryo, which will offer the best on-screen Japanese ever. It contains no embedded bitmaps, so it's fully scalable. We used the TrueType hinting language to do the stroke-reduction.
I'm privileged to manage a group of folks at Microsoft who are passionate about creating the best type in the world for the screen. But the passion goes all the way to the top. I've actually had e-mail from BillG, at 10:30 P.M. on a Saturday night, asking me about ligature support! So please, next time you read on screen, remember you're using software technology with 5,500 years of history behind it. And never think of type, ever again, as "just fonts."

Bill Hill joined Microsoft in 1995 because he believed the company would lead the transition from reading on paper to reading on the screen. He is one of the inventors of the ClearType technology which dramatically improved the screen readability of text.

Page view tracker