Font hinting
[Image:Font-hinting-example.png|thumb|upright=2.0|A font test without hinting (upper rows) and with hinting (lower rows) at both true size and 400% scaling. Note the increased edge contrast with the hinted text but more faithful character shape and more natural inter-character spacing in the unhinted text.]
Font hinting, also known as instructing, is the use of mathematical instructions to adjust the display of an outline font so that it lines up with a rasterized grid. At low screen resolutions, hinting is critical for producing clear, legible text. It can be accompanied by antialiasing and subpixel rendering for further clarity.
Overview
For the purpose of on-screen text display, font hinting designates which primary pixels are interpolated to more clearly render a font. Hints are usually created in a font editor during the typeface design process and embedded in the font. A font can be hinted either automatically or set manually. Most font editors are able to do automatic hinting, and this approach is suitable for many fonts. However, high-quality commercial fonts are often manually hinted to provide the sharpest appearance on computer displays. Verdana is one example of a font that contains a large amount of hinting data, much of which was accomplished manually by type engineer Tom Rickner.Implementations
In the TrueType font format, released in 1991 by Apple Inc, hinting invokes tables of font data used to render fonts properly on screen. One aspect of TrueType hinting is grid-fitting, which modifies the height and width of font characters to line up to the set pixel grid of screen display. The open-source FreeType 2 font rendering engine uses an auto-hinter when such hinting data are not present or their use is restricted by a software patent. As of 2011, the FreeType website states that the relevant font hinting patents have now all expired, and hinting is now enabled in FreeType by default.Guidelines
According to the TrueType Reference Manual, font instructors must balance the following two constraints when hinting a font:- At small sizes, chance effects should not be allowed to magnify small differences in the original outline design of a glyph.
- At large sizes, the subtlety of the original design should emerge.