pub struct PlatformTextRenderingParameters {
pub subpixel_antialiasing: bool,
pub subpixel_geometry: SubpixelGeometry,
pub composited: bool,
pub text_contrast: Option<f32>,
pub text_gamma: Option<f32>,
}Expand description
The text rendering settings of the platform for a render surface.
A surface reports them through
IPlatformRenderSurface::text_rendering_parameters
when the platform knows them; a surface that reports nothing gets the
defaults of the backend (greyscale antialiasing).
Fields§
§subpixel_antialiasing: boolWhether the system renders text with subpixel antialiasing on the
display of the surface: ClearType on Windows (SPI_GETFONTSMOOTHING
and SPI_GETFONTSMOOTHINGTYPE), Xft.rgba on X11.
subpixel_geometry: SubpixelGeometryThe arrangement of the subpixels of the display, when it is known
(SPI_GETFONTSMOOTHINGORIENTATION on Windows).
composited: boolWhether the surface is composed with other content by a system compositor (Windows.UI.Composition, DirectComposition, a swap chain panel of a WinUI host). Native frameworks render greyscale text on such surfaces (WinUI 3 does), so subpixel text is not the default there.
text_contrast: Option<f32>The contrast added to the coverage of text, from 0 to 1, or None
for the default of the backend.
text_gamma: Option<f32>The gamma the coverage of text is corrected for, from 0 (exclusive
of 4), where 0 means sRGB, or None for the default of the backend.
Trait Implementations§
impl Copy for PlatformTextRenderingParameters
impl StructuralPartialEq for PlatformTextRenderingParameters
Auto Trait Implementations§
impl Freeze for PlatformTextRenderingParameters
impl RefUnwindSafe for PlatformTextRenderingParameters
impl Send for PlatformTextRenderingParameters
impl Sync for PlatformTextRenderingParameters
impl Unpin for PlatformTextRenderingParameters
impl UnsafeUnpin for PlatformTextRenderingParameters
impl UnwindSafe for PlatformTextRenderingParameters
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more