[][src]Struct style::properties::style_structs::Font

pub struct Font {
    pub font_family: T,
    pub font_style: T,
    pub font_variant_caps: T,
    pub font_weight: T,
    pub font_size: T,
    pub font_stretch: T,
    pub hash: u64,
}

The Font style struct.

Fields

font_family: T

The font-family computed value.

font_style: T

The font-style computed value.

font_variant_caps: T

The font-variant-caps computed value.

font_weight: T

The font-weight computed value.

font_size: T

The font-size computed value.

font_stretch: T

The font-stretch computed value.

hash: u64

The font hash, used for font caching.

Implementations

impl Font[src]

pub fn set_font_family(&mut self, v: T)[src]

Set font-family.

pub fn copy_font_family_from(&mut self, other: &Self)[src]

Set font-family from other struct.

pub fn reset_font_family(&mut self, other: &Self)[src]

Reset font-family from the initial struct.

pub fn clone_font_family(&self) -> T[src]

Get the computed value for font-family.

pub fn set_font_style(&mut self, v: T)[src]

Set font-style.

pub fn copy_font_style_from(&mut self, other: &Self)[src]

Set font-style from other struct.

pub fn reset_font_style(&mut self, other: &Self)[src]

Reset font-style from the initial struct.

pub fn clone_font_style(&self) -> T[src]

Get the computed value for font-style.

pub fn set_font_variant_caps(&mut self, v: T)[src]

Set font-variant-caps.

pub fn copy_font_variant_caps_from(&mut self, other: &Self)[src]

Set font-variant-caps from other struct.

pub fn reset_font_variant_caps(&mut self, other: &Self)[src]

Reset font-variant-caps from the initial struct.

pub fn clone_font_variant_caps(&self) -> T[src]

Get the computed value for font-variant-caps.

pub fn set_font_weight(&mut self, v: T)[src]

Set font-weight.

pub fn copy_font_weight_from(&mut self, other: &Self)[src]

Set font-weight from other struct.

pub fn reset_font_weight(&mut self, other: &Self)[src]

Reset font-weight from the initial struct.

pub fn clone_font_weight(&self) -> T[src]

Get the computed value for font-weight.

pub fn set_font_size(&mut self, v: T)[src]

Set font-size.

pub fn copy_font_size_from(&mut self, other: &Self)[src]

Set font-size from other struct.

pub fn reset_font_size(&mut self, other: &Self)[src]

Reset font-size from the initial struct.

pub fn clone_font_size(&self) -> T[src]

Get the computed value for font-size.

pub fn set_font_stretch(&mut self, v: T)[src]

Set font-stretch.

pub fn copy_font_stretch_from(&mut self, other: &Self)[src]

Set font-stretch from other struct.

pub fn reset_font_stretch(&mut self, other: &Self)[src]

Reset font-stretch from the initial struct.

pub fn clone_font_stretch(&self) -> T[src]

Get the computed value for font-stretch.

pub fn compute_font_hash(&mut self)[src]

Computes a font hash in order to be able to cache fonts effectively in GFX and layout.

pub fn inherit_font_size_from(
    &mut self,
    parent: &Self,
    _: Option<NonNegativeLength>,
    _: &Device
)
[src]

(Servo does not handle MathML, so this just calls copy_font_size_from)

pub fn apply_font_size(
    &mut self,
    v: T,
    _: &Self,
    _: &Device
) -> Option<NonNegativeLength>
[src]

(Servo does not handle MathML, so this just calls set_font_size)

pub fn apply_unconstrained_font_size(&mut self, _: NonNegativeLength)[src]

(Servo does not handle MathML, so this does nothing)

Trait Implementations

impl Clone for Font[src]

impl Debug for Font[src]

impl<'de> Deserialize<'de> for Font[src]

impl MallocSizeOf for Font[src]

impl PartialEq<Font> for Font[src]

impl Serialize for Font[src]

Auto Trait Implementations

impl RefUnwindSafe for Font

impl Send for Font

impl Sync for Font

impl Unpin for Font

impl UnwindSafe for Font

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeBoxed<Box<T>> for T[src]

impl<T> MaybeBoxed<T> for T[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]