This enum describes the different levels of hinting that can be applied to glyphs to improve legibility on displays where it might be warranted by the density of pixels.
|QFont::PreferDefaultHinting||0||Use the default hinting level for the target platform.|
|QFont::PreferNoHinting||1||If possible, render text without hinting the outlines of the glyphs. The text layout will be typographically accurate and scalable, using the same metrics as are used e.g. when printing.|
|QFont::PreferVerticalHinting||2||If possible, render text with no horizontal hinting, but align glyphs to the pixel grid in the vertical direction. The text will appear crisper on displays where the density is too low to give an accurate rendering of the glyphs. But since the horizontal metrics of the glyphs are unhinted, the text's layout will be scalable to higher density devices (such as printers) without impacting details such as line breaks.|
|QFont::PreferFullHinting||3||If possible, render text with hinting in both horizontal and vertical directions. The text will be altered to optimize legibility on the target device, but since the metrics will depend on the target size of the text, the positions of glyphs, line breaks, and other typographical detail will not scale, meaning that a text layout may look different on devices with different pixel densities.|
Please note that this enum only describes a preference, as the full range of hinting levels are not supported on all of Qt's supported platforms. The following table details the effect of a given hinting preference on a selected set of target platforms.
|Windows Vista (w/o Platform Update) and earlier||Full hinting||Full hinting||Full hinting||Full hinting|
|Windows 7 and Windows Vista (w/Platform Update) and DirectWrite enabled in Qt||Full hinting||Vertical hinting||Vertical hinting||Full hinting|
|FreeType||Operating System setting||No hinting||Vertical hinting (light)||Full hinting|
|Cocoa on macOS||No hinting||No hinting||No hinting||No hinting|
Note: Please be aware that altering the hinting preference on Windows is available through the DirectWrite font engine. This is available on Windows Vista after installing the platform update, and on Windows 7. In order to use this extension, configure Qt using -directwrite. The target application will then depend on the availability of DirectWrite on the target system.
This enum was introduced or modified in Qt 4.8.