pub struct TextStyle;

Implementations§

source§

impl TextStyle

source

pub fn new() -> Self

source

pub fn to_placeholder(&self) -> Self

👎Deprecated since 0.51.0: Use clone_for_placeholder
source

pub fn clone_for_placeholder(&self) -> Self

source

pub fn equals(&self, _other: &TextStyle) -> bool

source

pub fn equals_by_fonts(&self, _that: &TextStyle) -> bool

source

pub fn color(&self) -> Color

source

pub fn set_color(&mut self, _color: impl Into<Color>) -> &mut Self

source

pub fn foreground(&self) -> Paint

source

pub fn set_foreground_color(&mut self, _paint: &Paint) -> &mut Self

source

pub fn clear_foreground_color(&mut self) -> &mut Self

source

pub fn background(&self) -> Paint

source

pub fn set_background_color(&mut self, _paint: &Paint) -> &mut Self

source

pub fn clear_background_color(&mut self) -> &mut Self

source

pub fn decoration(&self) -> &Decoration

source

pub fn decoration_mut(&mut self) -> &mut Decoration

source

pub fn font_style(&self) -> FontStyle

source

pub fn set_font_style(&mut self, _font_style: FontStyle) -> &mut Self

source

pub fn shadows(&self) -> &[TextShadow]

source

pub fn add_shadow(&mut self, _shadow: TextShadow) -> &mut Self

source

pub fn reset_shadows(&mut self) -> &mut Self

source

pub fn font_features(&self) -> &[FontFeature]

source

pub fn add_font_feature(&mut self, _font_feature: impl AsRef<str>, _value: i32)

source

pub fn reset_font_features(&mut self)

source

pub fn font_size(&self) -> f32

source

pub fn set_font_size(&mut self, _size: f32) -> &mut Self

source

pub fn font_families(&self) -> FontFamilies

source

pub fn set_font_families(&mut self, _families: &[impl AsRef<str>]) -> &mut Self

source

pub fn baseline_shift(&self) -> f32

source

pub fn set_baseline_shift(&mut self, _baseline_shift: f32) -> &mut Self

source

pub fn set_height(&mut self, _height: f32) -> &mut Self

source

pub fn height(&self) -> f32

source

pub fn set_height_override(&mut self, _height_override: bool) -> &mut Self

source

pub fn height_override(&self) -> bool

source

pub fn set_half_leading(&mut self, _half_leading: bool) -> &mut Self

source

pub fn half_leading(&self) -> bool

source

pub fn set_letter_spacing(&mut self, _letter_spacing: f32) -> &mut Self

source

pub fn letter_spacing(&self) -> f32

source

pub fn set_word_spacing(&mut self, _word_spacing: f32) -> &mut Self

source

pub fn word_spacing(&self) -> f32

source

pub fn typeface(&self) -> Option<Typeface>

source

pub fn set_typeface( &mut self, _typeface: impl Into<Option<Typeface>> ) -> &mut Self

source

pub fn locale(&self) -> &str

source

pub fn set_locale(&mut self, _locale: impl AsRef<str>) -> &mut Self

source

pub fn text_baseline(&self) -> TextBaseline

source

pub fn set_text_baseline(&mut self, _baseline: TextBaseline) -> &mut Self

source

pub fn font_metrics(&self) -> FontMetrics

source

pub fn is_placeholder(&self) -> bool

source

pub fn set_placeholder(&mut self) -> &mut Self

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.