pub struct FontFace<'a> { /* private fields */ }Expand description
Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions and additional information such as platformFontFamily and fontVariationAxes.
Implementations§
Source§impl<'a> FontFace<'a>
impl<'a> FontFace<'a>
Sourcepub fn builder(
font_family: impl Into<Cow<'a, str>>,
font_style: impl Into<Cow<'a, str>>,
font_variant: impl Into<Cow<'a, str>>,
font_weight: impl Into<Cow<'a, str>>,
font_stretch: impl Into<Cow<'a, str>>,
font_display: impl Into<Cow<'a, str>>,
unicode_range: impl Into<Cow<'a, str>>,
src: impl Into<Cow<'a, str>>,
platform_font_family: impl Into<Cow<'a, str>>,
) -> FontFaceBuilder<'a>
pub fn builder( font_family: impl Into<Cow<'a, str>>, font_style: impl Into<Cow<'a, str>>, font_variant: impl Into<Cow<'a, str>>, font_weight: impl Into<Cow<'a, str>>, font_stretch: impl Into<Cow<'a, str>>, font_display: impl Into<Cow<'a, str>>, unicode_range: impl Into<Cow<'a, str>>, src: impl Into<Cow<'a, str>>, platform_font_family: impl Into<Cow<'a, str>>, ) -> FontFaceBuilder<'a>
Creates a builder for this type with the required parameters:
font_family: The font-family.font_style: The font-style.font_variant: The font-variant.font_weight: The font-weight.font_stretch: The font-stretch.font_display: The font-display.unicode_range: The unicode-range.src: The src.platform_font_family: The resolved platform font family
Sourcepub fn font_family(&self) -> &str
pub fn font_family(&self) -> &str
The font-family.
Sourcepub fn font_style(&self) -> &str
pub fn font_style(&self) -> &str
The font-style.
Sourcepub fn font_variant(&self) -> &str
pub fn font_variant(&self) -> &str
The font-variant.
Sourcepub fn font_weight(&self) -> &str
pub fn font_weight(&self) -> &str
The font-weight.
Sourcepub fn font_stretch(&self) -> &str
pub fn font_stretch(&self) -> &str
The font-stretch.
Sourcepub fn font_display(&self) -> &str
pub fn font_display(&self) -> &str
The font-display.
Sourcepub fn unicode_range(&self) -> &str
pub fn unicode_range(&self) -> &str
The unicode-range.
Sourcepub fn platform_font_family(&self) -> &str
pub fn platform_font_family(&self) -> &str
The resolved platform font family
Sourcepub fn font_variation_axes(&self) -> Option<&[FontVariationAxis<'a>]>
pub fn font_variation_axes(&self) -> Option<&[FontVariationAxis<'a>]>
Available variation settings (a.k.a. “axes”).
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for FontFace<'a>
impl<'de, 'a> Deserialize<'de> for FontFace<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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> UnsafeUnpin for FontFace<'a>
impl<'a> UnwindSafe for FontFace<'a>
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