pub type TextStyle = Handle<skia_textlayout_TextStyle>;
Aliased Type§
struct TextStyle(/* private fields */);
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 match_one_attribute( &self, style_type: StyleType, other: &TextStyle, ) -> bool
pub fn color(&self) -> Color
pub fn set_color(&mut self, color: impl Into<Color>) -> &mut Self
pub fn has_foreground(&self) -> bool
pub fn foreground(&self) -> Paint
pub fn set_foreground_paint(&mut self, paint: &Paint) -> &mut Self
pub fn set_foreground_color(&mut self, paint: &Paint) -> &mut Self
👎Deprecated since 0.64.0: use set_foreground_paint()
pub fn clear_foreground_color(&mut self) -> &mut Self
pub fn has_background(&self) -> bool
pub fn background(&self) -> Paint
pub fn set_background_paint(&mut self, paint: &Paint) -> &mut Self
pub fn set_background_color(&mut self, paint: &Paint) -> &mut Self
👎Deprecated since 0.64.0: use set_background_paint()
pub fn clear_background_color(&mut self) -> &mut Self
pub fn decoration(&self) -> &Decoration
pub fn decoration_type(&self) -> TextDecoration
pub fn decoration_mode(&self) -> TextDecorationMode
pub fn decoration_color(&self) -> Color
pub fn decoration_style(&self) -> TextDecorationStyle
pub fn decoration_thickness_multiplier(&self) -> scalar
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 set_decoration_thickness_multiplier(&mut self, multiplier: scalar)
pub fn decoration_mut(&mut self) -> &mut Decoration
👎Deprecated since 0.63.1: use set_decoration()
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_arguments(&self) -> Option<&FontArguments>
Sourcepub fn set_font_arguments<'fa>(
&mut self,
arguments: impl Into<Option<&'fa FontArguments<'fa, 'fa>>>,
)
pub fn set_font_arguments<'fa>( &mut self, arguments: impl Into<Option<&'fa FontArguments<'fa, 'fa>>>, )
The contents of the crate::FontArguments
will be copied into the TextStyle
.