pub struct TextStyle;
Implementations§
Source§impl TextStyle
impl TextStyle
pub fn new() -> Self
pub fn to_placeholder(&self) -> Self
👎Deprecated since 0.51.0: Use clone_for_placeholder
pub fn clone_for_placeholder(&self) -> Self
pub fn equals(&self, _other: &TextStyle) -> bool
pub fn equals_by_fonts(&self, _that: &TextStyle) -> bool
pub fn color(&self) -> Color
pub fn set_color(&mut self, _color: impl Into<Color>) -> &mut Self
pub fn foreground(&self) -> Paint
pub fn set_foreground_color(&mut self, _paint: &Paint) -> &mut Self
pub fn clear_foreground_color(&mut self) -> &mut Self
pub fn background(&self) -> Paint
pub fn set_background_color(&mut self, _paint: &Paint) -> &mut Self
pub fn clear_background_color(&mut self) -> &mut Self
pub fn decoration(&self) -> &Decoration
pub fn set_decoration(&mut self, decoration: &Decoration)
pub fn set_decoration_type(&mut self, decoration: TextDecoration)
pub fn set_decoration_mode(&mut self, mode: TextDecorationMode)
pub fn set_decoration_style(&mut self, style: TextDecorationStyle)
pub fn set_decoration_color(&mut self, color: impl Into<Color>)
pub fn font_style(&self) -> FontStyle
pub fn set_font_style(&mut self, _font_style: FontStyle) -> &mut Self
pub fn shadows(&self) -> &[TextShadow]
pub fn add_shadow(&mut self, _shadow: TextShadow) -> &mut Self
pub fn reset_shadows(&mut self) -> &mut Self
pub fn font_features(&self) -> &[FontFeature]
pub fn add_font_feature(&mut self, _font_feature: impl AsRef<str>, _value: i32)
pub fn reset_font_features(&mut self)
pub fn font_size(&self) -> f32
pub fn set_font_size(&mut self, _size: f32) -> &mut Self
pub fn font_families(&self) -> FontFamilies
pub fn set_font_families(&mut self, _families: &[impl AsRef<str>]) -> &mut Self
pub fn baseline_shift(&self) -> f32
pub fn set_baseline_shift(&mut self, _baseline_shift: f32) -> &mut Self
pub fn set_height(&mut self, _height: f32) -> &mut Self
pub fn height(&self) -> f32
pub fn set_height_override(&mut self, _height_override: bool) -> &mut Self
pub fn height_override(&self) -> bool
pub fn set_half_leading(&mut self, _half_leading: bool) -> &mut Self
pub fn half_leading(&self) -> bool
pub fn set_letter_spacing(&mut self, _letter_spacing: f32) -> &mut Self
pub fn letter_spacing(&self) -> f32
pub fn set_word_spacing(&mut self, _word_spacing: f32) -> &mut Self
pub fn word_spacing(&self) -> f32
pub fn typeface(&self) -> Option<Typeface>
pub fn set_typeface( &mut self, _typeface: impl Into<Option<Typeface>>, ) -> &mut Self
pub fn locale(&self) -> &str
pub fn set_locale(&mut self, _locale: impl AsRef<str>) -> &mut Self
pub fn text_baseline(&self) -> TextBaseline
pub fn set_text_baseline(&mut self, _baseline: TextBaseline) -> &mut Self
pub fn font_metrics(&self) -> FontMetrics
pub fn is_placeholder(&self) -> bool
pub fn set_placeholder(&mut self) -> &mut Self
pub fn set_height_behavior(&mut self, behavior: TextHeightBehavior)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnwindSafe for TextStyle
Blanket Implementations§
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
Mutably borrows from an owned value. Read more