Struct qt_gui::q_font::StyleStrategy
source · pub struct StyleStrategy(/* private fields */);
Expand description
The style strategy tells the font matching algorithm what type of fonts should be used to find an appropriate default family.
C++ enum: QFont::StyleStrategy
.
The style strategy tells the font matching algorithm what type of fonts should be used to find an appropriate default family.
The following strategies are available:
Any of these may be OR-ed with one of these flags:
Implementations§
source§impl StyleStrategy
impl StyleStrategy
sourcepub const PreferDefault: StyleStrategy = _
pub const PreferDefault: StyleStrategy = _
the default style strategy. It does not prefer any type of font. (C++ enum variant: PreferDefault = 1
)
sourcepub const PreferBitmap: StyleStrategy = _
pub const PreferBitmap: StyleStrategy = _
prefers bitmap fonts (as opposed to outline fonts). (C++ enum variant: PreferBitmap = 2
)
sourcepub const PreferDevice: StyleStrategy = _
pub const PreferDevice: StyleStrategy = _
prefers device fonts. (C++ enum variant: PreferDevice = 4
)
sourcepub const PreferOutline: StyleStrategy = _
pub const PreferOutline: StyleStrategy = _
prefers outline fonts (as opposed to bitmap fonts). (C++ enum variant: PreferOutline = 8
)
sourcepub const ForceOutline: StyleStrategy = _
pub const ForceOutline: StyleStrategy = _
forces the use of outline fonts. (C++ enum variant: ForceOutline = 16
)
sourcepub const PreferMatch: StyleStrategy = _
pub const PreferMatch: StyleStrategy = _
prefer an exact match. The font matcher will try to use the exact font size that has been specified. (C++ enum variant: PreferMatch = 32
)
sourcepub const PreferQuality: StyleStrategy = _
pub const PreferQuality: StyleStrategy = _
prefer the best quality font. The font matcher will use the nearest standard point size that the font supports. (C++ enum variant: PreferQuality = 64
)
sourcepub const PreferAntialias: StyleStrategy = _
pub const PreferAntialias: StyleStrategy = _
antialias if possible. (C++ enum variant: PreferAntialias = 128
)
sourcepub const NoAntialias: StyleStrategy = _
pub const NoAntialias: StyleStrategy = _
don’t antialias the fonts. (C++ enum variant: NoAntialias = 256
)
sourcepub const OpenGLCompatible: StyleStrategy = _
pub const OpenGLCompatible: StyleStrategy = _
forces the use of OpenGL compatible fonts. (C++ enum variant: OpenGLCompatible = 512
)
sourcepub const ForceIntegerMetrics: StyleStrategy = _
pub const ForceIntegerMetrics: StyleStrategy = _
forces the use of integer values in font engines that support fractional font metrics. (C++ enum variant: ForceIntegerMetrics = 1024
)
sourcepub const NoSubpixelAntialias: StyleStrategy = _
pub const NoSubpixelAntialias: StyleStrategy = _
avoid subpixel antialiasing on the fonts if possible. (C++ enum variant: NoSubpixelAntialias = 2048
)
sourcepub const NoFontMerging: StyleStrategy = _
pub const NoFontMerging: StyleStrategy = _
If the font selected for a certain writing system does not contain a character requested to draw, then Qt automatically chooses a similar looking font that contains the character. The NoFontMerging flag disables this feature. Please note that enabling this flag will not prevent Qt from automatically picking a suitable font when the selected font does not support the writing system of the text. (C++ enum variant: NoFontMerging = 32768
)
sourcepub const PreferNoShaping: StyleStrategy = _
pub const PreferNoShaping: StyleStrategy = _
Sometimes, a font will apply complex rules to a set of characters in order to display them correctly. In some writing systems, such as Brahmic scripts, this is required in order for the text to be legible, but in e.g. Latin script, it is merely a cosmetic feature. The PreferNoShaping flag will disable all such features when they are not required, which will improve performance in most cases (since Qt 5.10). (C++ enum variant: PreferNoShaping = 4096
)
Trait Implementations§
source§impl Clone for StyleStrategy
impl Clone for StyleStrategy
source§fn clone(&self) -> StyleStrategy
fn clone(&self) -> StyleStrategy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StyleStrategy
impl Debug for StyleStrategy
source§impl From<StyleStrategy> for c_int
impl From<StyleStrategy> for c_int
source§fn from(value: StyleStrategy) -> Self
fn from(value: StyleStrategy) -> Self
source§impl From<i32> for StyleStrategy
impl From<i32> for StyleStrategy
source§impl PartialEq for StyleStrategy
impl PartialEq for StyleStrategy
source§fn eq(&self, other: &StyleStrategy) -> bool
fn eq(&self, other: &StyleStrategy) -> bool
self
and other
values to be equal, and is used
by ==
.