Skip to main content

TextStyle

Struct TextStyle 

Source
pub struct TextStyle {
Show 34 fields pub font: Option<Font>, pub font_size: Option<f64>, pub faux_bold: Option<bool>, pub faux_italic: Option<bool>, pub auto_leading: Option<bool>, pub leading: Option<f64>, pub horizontal_scale: Option<f64>, pub vertical_scale: Option<f64>, pub tracking: Option<f64>, pub auto_kerning: Option<bool>, pub kerning: Option<f64>, pub baseline_shift: Option<f64>, pub font_caps: Option<f64>, pub font_baseline: Option<f64>, pub underline: Option<bool>, pub strikethrough: Option<bool>, pub ligatures: Option<bool>, pub d_ligatures: Option<bool>, pub baseline_direction: Option<f64>, pub tsume: Option<f64>, pub style_run_alignment: Option<f64>, pub language: Option<f64>, pub no_break: Option<bool>, pub fill_color: Option<Color>, pub stroke_color: Option<Color>, pub fill_flag: Option<bool>, pub stroke_flag: Option<bool>, pub fill_first: Option<bool>, pub y_underline: Option<f64>, pub outline_width: Option<f64>, pub character_direction: Option<f64>, pub hindi_numbers: Option<bool>, pub kashida: Option<f64>, pub diacritic_pos: Option<f64>,
}
Expand description

TS TextStyle.

Fields§

§font: Option<Font>§font_size: Option<f64>§faux_bold: Option<bool>§faux_italic: Option<bool>§auto_leading: Option<bool>§leading: Option<f64>§horizontal_scale: Option<f64>§vertical_scale: Option<f64>§tracking: Option<f64>§auto_kerning: Option<bool>§kerning: Option<f64>§baseline_shift: Option<f64>§font_caps: Option<f64>

0 - none, 1 - small caps, 2 - all caps

§font_baseline: Option<f64>

0 - normal, 1 - superscript, 2 - subscript

§underline: Option<bool>§strikethrough: Option<bool>§ligatures: Option<bool>§d_ligatures: Option<bool>§baseline_direction: Option<f64>§tsume: Option<f64>§style_run_alignment: Option<f64>§language: Option<f64>§no_break: Option<bool>§fill_color: Option<Color>§stroke_color: Option<Color>§fill_flag: Option<bool>§stroke_flag: Option<bool>§fill_first: Option<bool>§y_underline: Option<f64>§outline_width: Option<f64>§character_direction: Option<f64>§hindi_numbers: Option<bool>§kashida: Option<f64>§diacritic_pos: Option<f64>

Trait Implementations§

Source§

impl Clone for TextStyle

Source§

fn clone(&self) -> TextStyle

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for TextStyle

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for TextStyle

Source§

fn default() -> TextStyle

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

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.