[][src]Struct qt_gui::q_font::HintingPreference

#[repr(transparent)]
pub struct HintingPreference(_);

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.

C++ enum: QFont::HintingPreference.

C++ documentation:

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.

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.

PreferDefaultHintingPreferNoHintingPreferVerticalHintingPreferFullHinting
Windows Vista (w/o Platform Update) and earlierFull hintingFull hintingFull hintingFull hinting
Windows 7 and Windows Vista (w/Platform Update) and DirectWrite enabled in QtFull hintingVertical hintingVertical hintingFull hinting
FreeTypeOperating System settingNo hintingVertical hinting (light)Full hinting
Cocoa on macOSNo hintingNo hintingNo hintingNo 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.

Methods

impl HintingPreference[src]

pub fn to_int(&self) -> c_int[src]

impl HintingPreference[src]

pub const PreferDefaultHinting: HintingPreference[src]

Use the default hinting level for the target platform. (C++ enum variant: PreferDefaultHinting = 0)

pub const PreferNoHinting: HintingPreference[src]

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. (C++ enum variant: PreferNoHinting = 1)

pub const PreferVerticalHinting: HintingPreference[src]

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. (C++ enum variant: PreferVerticalHinting = 2)

pub const PreferFullHinting: HintingPreference[src]

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. (C++ enum variant: PreferFullHinting = 3)

Trait Implementations

impl Clone for HintingPreference[src]

impl Copy for HintingPreference[src]

impl Debug for HintingPreference[src]

impl Eq for HintingPreference[src]

impl From<HintingPreference> for c_int[src]

impl From<i32> for HintingPreference[src]

impl PartialEq<HintingPreference> for HintingPreference[src]

impl StructuralEq for HintingPreference[src]

impl StructuralPartialEq for HintingPreference[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.