The development of digital font formats included a technology that enabled the font maker to improve the display of type on low resolution Media. This technology is called hinting. In reference to the „allegory of the cave“ hinting means: you change the „real“ thing so that its shadow looks more like the original form.
Hinting first came up with the PostScript Format. The term „hinting“ literally means that „hints“ give advice to the rasterizer as to how it has to render a specific glyph in low resolution. Today we have two different outline formats in fonts. This leads to two different hinting approaches. With PostScript outlines hints are a general set of tools. The person who hints can define stems and certain zones. For TrueType outlines there are more tools and they are more powerful. They are called instructions.
For the sake of PostScript we have to add that the display of PostScript fonts is not as problematic as the display of TrueTypes. The reason behind this is that the PostScript rasterizer needs less extra information to create a reasonable output. But, in case of an unexpected issue chances of correcting those are much worse than with the TrueType format, because TrueType hinting knows very powerful tools to control every pixel in the display of font in any point size.
Hints are distinguished into global hints and glyph specific hints. Global hints are parameters that are effective for the whole font, while glyph specific hints are only relevant to individual glyphs and some are even only effective for specific point sizes. We will dive into the world of hints now.
The group of global hints consists of Alignment Zones in Y-direction and Stems in X- and Y-direction. To understand how these hints work it is helpful to take a look at what happens, if there are no global hints in a font. The first thing that appears to the viewer’s eye is the wavy top edge of the characters when you type them in a single line. The glyphs seem to have different heights although they have the same point sizes.
Looking closer one will find out that glyphs with round shapes (O, C, S, G, etc.) are a pixel higher than glyphs with a „squarish“ shape (W, V, X, H, etc.). But that does not happen by chance: characters with a round shape are 1-2% higher than the other characters. Typeface designers use this trick to optically match the heights of the round and square characters. On a high-resolution print out one can hardly notice any difference. But, if the rasterizer distinguishes these heights in a low-resolution environment by drawing the round shapes one pixel higher, suddenly they appear up to 10% higher than square characters. The result is a wavy top that is jumping up and down depending on the shape of the glyph.
To avoid this, hinting introduces Alignment Zones. They globally define vertical ranges in the font that often match typographical values for x-height, cap height, or baseline. A zone spreads over 2% of the cap height and all the points on an outline that are assigned to a specific Alignment Zone are handled as if they had the same Y-coordinate. The only thing that needs to be done is to go through all the glyphs in the font and assign its extremes to zones. This process gives the rasterizer the „hint“ that all shapes that are assigned to a specific zone have to be rendered to the same size. The top edge issue is solved.
Unfortunately this is not it. The font still looks spotted. Some stems are one, others two pixel wide and when you measure them you will find out that they are different. Type designers use another trick to achieve optical regularity between the straight stems (H, L, I,…) and round stems (O, G, C,…). Round stems are slightly bolder than straight stems. The rasterizer tries to display the difference and ends up drawing some stems with one, two or no pixels. This leads to the spotty display, because some stems are either twice as bold as others, while in reality they are only slightly bolder. To avoid that it is possible to define stems and to determine in which point sizes a specific stem should consist of one, two, three, or more pixels. With that tool it is possible to control the boldness of the stems in low-resolution and to make sure they behave the same no matter whether they are straight stems or round stems.
After defining the stem sizes and their behavior, the hinter has to go through each glyph in the font and specify what is a stem in that specific glyph. While Zones are defined only in Y-direction, stems are defined in X- and Y-direction. Another fundamental problem with low-resolution display is under control.
The basic hinting procedure as described above is a simplified description. It gets more complicated when you think of working with a whole font family with many weights. A good example to mention is the Frutiger Neue family that consists of ten different stem widths. It’s very difficult to distinguish all members of the family in low-resolution display. The hinter cannot simply make each weight one pixel bolder than the weight before.
The concept of global hints is part of PostScript as well as TrueType. For PostScript based fonts (no matter, if PostScript Type1 or OpenType) this is often good enough, although certainly not outstanding.
With TrueType fonts there are still some major issues that need to be resolved. Blobs, characters sticking to each other, filled out counters are a few of those problems. The tools that the hinter uses to solve these kinds of problems are called Delta-instructions. One operates with them in a way like painters use very fine brushes. And they do not work across several point sizes, but only in one single point size. Delta-hinting therefore is very time consuming and expensive. The value received is the full control over the Pixel display of each glyph in each size.
Two levels of Delta-hints exist, middle-delta-intructions and final-delta-instructions. The middle-delta respects global hints. You can use a middle-delta to shift a whole character to the right or to the left to avoid that it crashes into another glyph. The middle-delta shifts the glyph, but stems and zones remain unchanged.
Not so with final deltas. These low level tools give control every tiny bit of the glyph’s display, more or less ignoring global hints. Final deltas allow the hinter to get rid of the smallest artifacts.
Next week’s installment will be about the practice of hinting!