Trait rich_sdl2_rust::ttf::font::StyleExt
source · 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§
sourcefn font_style(&self) -> FontStyle
fn font_style(&self) -> FontStyle
Returns the current font style.
sourcefn set_font_style(&self, style: FontStyle)
fn set_font_style(&self, style: FontStyle)
Sets the font style.
sourcefn outline_width(&self) -> u32
fn outline_width(&self) -> u32
Returns the current outline width in pixels.
sourcefn set_outline_width(&self, pixels: u32)
fn set_outline_width(&self, pixels: u32)
Sets the outline width in pixels.
sourcefn set_font_size(&self, points: u32) -> Result<()>
fn set_font_size(&self, points: u32) -> Result<()>
Sets the font size in points, or Err
on failure.