Hinting
Embed This Widget
Add the script tag and a data attribute to embed this widget.
Embed via iframe for maximum compatibility.
<iframe src="https://fontfyi.com/iframe/glossary/hinting/" width="420" height="400" frameborder="0" style="border:0;border-radius:10px;max-width:100%" loading="lazy"></iframe>
Paste this URL in WordPress, Medium, or any oEmbed-compatible platform.
https://fontfyi.com/glossary/hinting/
Add a dynamic SVG badge to your README or docs.
[](https://fontfyi.com/glossary/hinting/)
Use the native HTML custom element.
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.
相关术语
展示此概念的字体
了解更多
移动应用需要在小字号下依然可读、加载迅速,并在高密度屏幕上显示清晰的字体。iOS 和 Android 的最佳选择。
字体评测Google Fonts 上最好的衬线体——从屏幕优化的正文衬线体到优雅的展示衬线体,全部免费且开源。
字体评测两款专为卓越屏幕阅读而生的衬线体。Source Serif 4 与 Merriweather——哪款屏幕优化衬线体更适合你的内容?
字体评测Google 委托设计了 Roboto 和 Open Sans,两者都极受欢迎。但它们服务于不同的用途——这里介绍如何选择。