pub trait StyleExt {
    // Required methods
    fn font_style(&self) -> FontStyle;
    fn set_font_style(&self, style: FontStyle);
    fn outline_width(&self) -> u32;
    fn set_outline_width(&self, pixels: u32);
    fn set_font_size(&self, points: u32) -> Result<()>;
    fn set_font_size_dpi(&self, points: u32, dpi: Dpi) -> Result<()>;
}
Expand description

An extension of FontStyle and outline width getters/setters.

Required Methods§

source

fn font_style(&self) -> FontStyle

Returns the current font style.

source

fn set_font_style(&self, style: FontStyle)

Sets the font style.

source

fn outline_width(&self) -> u32

Returns the current outline width in pixels.

source

fn set_outline_width(&self, pixels: u32)

Sets the outline width in pixels.

source

fn set_font_size(&self, points: u32) -> Result<()>

Sets the font size in points, or Err on failure.

source

fn set_font_size_dpi(&self, points: u32, dpi: Dpi) -> Result<()>

Sets the font size in points and dpi, or Err on failure.

Implementors§

source§

impl StyleExt for Font<'_>