Technology

Hinting

Instructions embedded in a font that improve its rendering at small sizes on low-resolution screens by aligning outlines to the pixel grid.

Hinting refers to instructions embedded in a font file that tell the rendering engine how to adjust letterform outlines to align properly with the pixel grid at small sizes. Without hinting, a letter's smooth vector curves might render with blurry, uneven strokes at common screen sizes — particularly at body text and UI text sizes where individual pixels are large relative to the letterforms.

The problem hinting solves is fundamental to rasterization: converting smooth vector outlines to a pixel grid. At 12px, the stem of a lowercase 'n' might naturally be 1.4 pixels wide — but pixels are binary, either on or off. A naive renderer would produce inconsistent stroke widths across the letters, with some stems rendering as 1 pixel and others as 2, creating an uneven, amateur-looking result. Hinting instructions specify exactly how these decisions should be made, ensuring consistent stroke rendering.

/* Hinting behavior is controlled by text rendering hints in CSS */

/* Default: let the browser/OS decide */
body {
  text-rendering: auto;
}

/* Optimize for readability — may enable subpixel hinting */
.body-text {
  text-rendering: optimizeLegibility;
  /* Enables: kerning, ligatures, and potentially better hinting
     Caution: historically caused performance issues in long text blocks */
}

/* Speed over quality — less hinting computation */
.performance-critical {
  text-rendering: optimizeSpeed;
}

/* Geometric precision — useful for specific cases */
.precise-text {
  text-rendering: geometricPrecision;
}

/* Font smoothing (OS-level, not hinting but related) */
body {
  -webkit-font-smoothing: antialiased; /* macOS */
  -moz-osx-font-smoothing: grayscale; /* macOS Firefox */
}

There are two major types of hinting: TrueType hinting (used in .ttf files) where type designers write explicit instructions using a low-level programming language — a process that can take hundreds of hours for a complete typeface family. PostScript/CFF hinting (used in .otf files) uses a simpler hint system that relies more on the renderer's automatic interpretation.

The importance of hinting has diminished significantly with high-DPI (retina) displays, where pixels are small enough that the rendering engine can follow the curves naturally without aggressive grid-alignment. At 2x and 3x pixel density, even unhinted fonts look sharp. However, hinting remains important for low-DPI displays — still common on budget monitors and many Windows systems. Well-hinted typefaces like Roboto and Noto Sans (designed specifically for Google's ecosystem) invested heavily in hinting to ensure quality rendering across the broadest possible range of display hardware.

관련 용어

이 개념을 보여주는 폰트

더 알아보기