Type Alias freya_engine::prelude::TextStyle

pub type TextStyle = Handle<skia_textlayout_TextStyle>;

Aliased Type§

struct TextStyle(/* private fields */);

Implementations

§

impl Handle<skia_textlayout_TextStyle>

pub fn new() -> Handle<skia_textlayout_TextStyle>

pub fn to_placeholder(&self) -> Handle<skia_textlayout_TextStyle>

👎Deprecated since 0.51.0: Use clone_for_placeholder

pub fn clone_for_placeholder(&self) -> Handle<skia_textlayout_TextStyle>

pub fn equals(&self, other: &Handle<skia_textlayout_TextStyle>) -> bool

pub fn equals_by_fonts(&self, that: &Handle<skia_textlayout_TextStyle>) -> bool

pub fn match_one_attribute( &self, style_type: skia_textlayout_StyleType, other: &Handle<skia_textlayout_TextStyle>, ) -> bool

pub fn color(&self) -> Color

pub fn set_color( &mut self, color: impl Into<Color>, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn has_foreground(&self) -> bool

pub fn foreground(&self) -> Handle<SkPaint>

pub fn set_foreground_paint( &mut self, paint: &Handle<SkPaint>, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn set_foreground_color( &mut self, paint: &Handle<SkPaint>, ) -> &mut Handle<skia_textlayout_TextStyle>

👎Deprecated since 0.64.0: use set_foreground_paint()

pub fn clear_foreground_color( &mut self, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn has_background(&self) -> bool

pub fn background(&self) -> Handle<SkPaint>

pub fn set_background_paint( &mut self, paint: &Handle<SkPaint>, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn set_background_color( &mut self, paint: &Handle<SkPaint>, ) -> &mut Handle<skia_textlayout_TextStyle>

👎Deprecated since 0.64.0: use set_background_paint()

pub fn clear_background_color( &mut self, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn decoration(&self) -> &Decoration

pub fn decoration_type(&self) -> TextDecoration

pub fn decoration_mode(&self) -> skia_textlayout_TextDecorationMode

pub fn decoration_color(&self) -> Color

pub fn decoration_style(&self) -> skia_textlayout_TextDecorationStyle

pub fn decoration_thickness_multiplier(&self) -> f32

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: skia_textlayout_TextDecorationMode)

pub fn set_decoration_style( &mut self, style: skia_textlayout_TextDecorationStyle, )

pub fn set_decoration_color(&mut self, color: impl Into<Color>)

pub fn set_decoration_thickness_multiplier(&mut self, multiplier: f32)

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 Handle<skia_textlayout_TextStyle>

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

pub fn add_shadow( &mut self, shadow: TextShadow, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn reset_shadows(&mut self) -> &mut Handle<skia_textlayout_TextStyle>

pub fn font_features(&self) -> &[Handle<skia_textlayout_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<&Handle<skia_textlayout_FontArguments>>

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.

pub fn font_size(&self) -> f32

pub fn set_font_size( &mut self, size: f32, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn font_families(&self) -> FontFamilies<'_>

pub fn set_font_families( &mut self, families: &[impl AsRef<str>], ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn baseline_shift(&self) -> f32

pub fn set_baseline_shift( &mut self, baseline_shift: f32, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn set_height( &mut self, height: f32, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn height(&self) -> f32

pub fn set_height_override( &mut self, height_override: bool, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn height_override(&self) -> bool

pub fn set_half_leading( &mut self, half_leading: bool, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn half_leading(&self) -> bool

pub fn set_letter_spacing( &mut self, letter_spacing: f32, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn letter_spacing(&self) -> f32

pub fn set_word_spacing( &mut self, word_spacing: f32, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn word_spacing(&self) -> f32

pub fn typeface(&self) -> Option<RCHandle<SkTypeface>>

pub fn set_typeface( &mut self, typeface: impl Into<Option<RCHandle<SkTypeface>>>, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn locale(&self) -> &str

pub fn set_locale( &mut self, locale: impl AsRef<str>, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn text_baseline(&self) -> skia_textlayout_TextBaseline

pub fn set_text_baseline( &mut self, baseline: skia_textlayout_TextBaseline, ) -> &mut Handle<skia_textlayout_TextStyle>

pub fn font_metrics(&self) -> FontMetrics

pub fn is_placeholder(&self) -> bool

pub fn set_placeholder(&mut self) -> &mut Handle<skia_textlayout_TextStyle>

Trait Implementations

§

impl<N> AsRef<Handle<N>> for Handle<N>
where N: NativeDrop,

§

fn as_ref(&self) -> &Handle<N>

Converts this type into a shared reference of the (usually inferred) input type.
§

impl<N> Clone for Handle<N>
where N: NativeDrop + NativeClone,

§

fn clone(&self) -> Handle<N>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Handle<skia_textlayout_TextStyle>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for Handle<skia_textlayout_TextStyle>

§

fn default() -> Handle<skia_textlayout_TextStyle>

Returns the “default value” for a type. Read more
§

impl<N> Drop for Handle<N>
where N: NativeDrop,

§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

impl<N> Hash for Handle<N>
where N: NativeDrop + NativeHash,

§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl<N> PartialEq for Handle<N>
where N: NativeDrop + NativePartialEq,

§

fn eq(&self, rhs: &Handle<N>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<N> RefWrapper<N> for Handle<N>
where N: NativeDrop,

§

fn wrap_ref(native: &N) -> &Handle<N>

§

fn wrap_mut(native: &mut N) -> &mut Handle<N>

§

fn inner(&self) -> &N

§

fn inner_mut(&mut self) -> &mut N

§

impl<N> ValueWrapper<N> for Handle<N>
where N: NativeDrop,

§

fn wrap(native: N) -> Handle<N>
where N: NativeDrop,

§

fn unwrap(self) -> N

§

fn inner(&self) -> &N

§

fn inner_mut(&mut self) -> &mut N

§

impl Send for Handle<skia_textlayout_TextStyle>

§

impl Sync for Handle<skia_textlayout_TextStyle>