[−][src]Struct style::properties::style_structs::Font
The Font style struct.
Fields
font_family: TThe font-family computed value.
font_style: TThe font-style computed value.
font_variant_caps: TThe font-variant-caps computed value.
font_weight: TThe font-weight computed value.
font_size: TThe font-size computed value.
font_stretch: TThe font-stretch computed value.
hash: u64The 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]
&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]
impl Debug for Font[src]
impl<'de> Deserialize<'de> for Font[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl MallocSizeOf for Font[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
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]
U: From<T>,
impl<T> MaybeBoxed<Box<T>> for T[src]
fn maybe_boxed(Self) -> Box<T>[src]
impl<T> MaybeBoxed<T> for T[src]
fn maybe_boxed(Self) -> 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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>, [src]
V: MultiLane<T>,