pub struct FontFaceAtRule {
pub family: Option<FamilyName>,
pub sources: Option<Vec<Source>>,
pub style: Option<FontStyle>,
pub weight: Option<FontWeight>,
pub stretch: Option<FontStretch>,
pub display: Option<FontDisplay>,
pub unicode_range: Option<Vec<UnicodeRange>>,
pub feature_settings: Option<FontFeatureSettings>,
pub language_override: Option<FontLanguageOverride>,
}Expand description
A @font-face rule.
Fields§
§family: Option<FamilyName>The name of this font face
sources: Option<Vec<Source>>The alternative sources for this font face.
style: Option<FontStyle>The style of this font face
weight: Option<FontWeight>The weight of this font face
stretch: Option<FontStretch>The stretch of this font face
display: Option<FontDisplay>The display of this font face
unicode_range: Option<Vec<UnicodeRange>>The ranges of code points outside of which this font face should not be used.
feature_settings: Option<FontFeatureSettings>The feature settings of this font face.
language_override: Option<FontLanguageOverride>The language override of this font face.
Implementations§
Source§impl FontFaceAtRule
impl FontFaceAtRule
Sourcepub fn font_face(&self) -> Option<FontFace<'_>>
pub fn font_face(&self) -> Option<FontFace<'_>>
Per https://github.com/w3c/csswg-drafts/issues/1133 an @font-face rule is valid as far as the CSS parser is concerned even if it doesn’t have a font-family or src declaration.
However both are required for the rule to represent an actual font face.
Trait Implementations§
Source§impl Clone for FontFaceAtRule
impl Clone for FontFaceAtRule
Source§fn clone(&self) -> FontFaceAtRule
fn clone(&self) -> FontFaceAtRule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FontFaceAtRule
impl Debug for FontFaceAtRule
Auto Trait Implementations§
impl Freeze for FontFaceAtRule
impl RefUnwindSafe for FontFaceAtRule
impl Send for FontFaceAtRule
impl Sync for FontFaceAtRule
impl Unpin for FontFaceAtRule
impl UnwindSafe for FontFaceAtRule
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