FontFace

Struct FontFace 

Source
pub struct FontFace<'a>(pub &'a FontFaceAtRule);
Expand description

A @font-face rule that is known to have font-family and src declarations.

Tuple Fields§

§0: &'a FontFaceAtRule

Implementations§

Source§

impl<'a> FontFace<'a>

Source

pub fn family(&self) -> &FamilyName

The name of this font face

Source

pub fn sources(&self) -> &Vec<Source>

The alternative sources for this font face.

Source

pub fn style(&self) -> FontStyle

The style of this font face

Source

pub fn weight(&self) -> FontWeight

The style of this font face

Source

pub fn stretch(&self) -> FontStretch

The stretch of this font face

Source

pub fn display(&self) -> FontDisplay

The display of this font face

Source

pub fn unicode_range(&self) -> Vec<UnicodeRange>

The ranges of code points outside of which this font face should not be used.

Source

pub fn feature_settings(&self) -> FontFeatureSettings

The feature settings of this font face.

Source

pub fn language_override(&self) -> FontLanguageOverride

The language override of this font face.

Auto Trait Implementations§

§

impl<'a> Freeze for FontFace<'a>

§

impl<'a> RefUnwindSafe for FontFace<'a>

§

impl<'a> Send for FontFace<'a>

§

impl<'a> Sync for FontFace<'a>

§

impl<'a> Unpin for FontFace<'a>

§

impl<'a> UnwindSafe for FontFace<'a>

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> 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, 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.