pub struct FontLayoutStyle {
pub font_family: Option<Arc<str>>,
pub font_size: f32,
pub font_style: FontStyle,
pub font_weight: f32,
pub font_width: f32,
pub line_height: Unit,
pub letter_spacing: Option<Unit>,
pub word_spacing: Option<Unit>,
pub text_align: TextAlign,
}Expand description
All of the properties needed for text layout.
Returned by Style::get_font_layout_style.
Intended to be used for text layout cache invalidation. If these changed, the cache is invalid.
Fields§
§font_family: Option<Arc<str>>§font_size: f32§font_style: FontStyle§font_weight: f32§font_width: f32§line_height: Unit§letter_spacing: Option<Unit>§word_spacing: Option<Unit>§text_align: TextAlignTrait Implementations§
Source§impl Clone for FontLayoutStyle
impl Clone for FontLayoutStyle
Source§fn clone(&self) -> FontLayoutStyle
fn clone(&self) -> FontLayoutStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FontLayoutStyle
impl Debug for FontLayoutStyle
Source§impl PartialEq for FontLayoutStyle
impl PartialEq for FontLayoutStyle
Source§fn eq(&self, other: &FontLayoutStyle) -> bool
fn eq(&self, other: &FontLayoutStyle) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FontLayoutStyle
Auto Trait Implementations§
impl Freeze for FontLayoutStyle
impl RefUnwindSafe for FontLayoutStyle
impl Send for FontLayoutStyle
impl Sync for FontLayoutStyle
impl Unpin for FontLayoutStyle
impl UnsafeUnpin for FontLayoutStyle
impl UnwindSafe for FontLayoutStyle
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