Struct style::properties::style_structs::Font
[−]
[src]
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.
Methods
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]
&mut self,
parent: &Self,
_: Option<NonNegativeLength>,
_: &Device
)
(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]
&mut self,
v: T,
_: &Self,
_: &Device
) -> Option<NonNegativeLength>
(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]
fn clone(&self) -> Font
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Font
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl MallocSizeOf for Font
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more