pub struct FontFeatureValuesRule {
pub family_names: Vec<FamilyName>,
pub swash: Vec<FFVDeclaration<SingleValue>>,
pub stylistic: Vec<FFVDeclaration<SingleValue>>,
pub ornaments: Vec<FFVDeclaration<SingleValue>>,
pub annotation: Vec<FFVDeclaration<SingleValue>>,
pub character_variant: Vec<FFVDeclaration<PairValues>>,
pub styleset: Vec<FFVDeclaration<VectorValues>>,
pub source_location: SourceLocation,
}Expand description
The @font-feature-values at-rule.
Fields§
§family_names: Vec<FamilyName>Font family list for @font-feature-values rule. Family names cannot contain generic families. FamilyName also accepts only non-generic names.
swash: Vec<FFVDeclaration<SingleValue>>A @swash blocksck. Specifies a feature name that will work with the swash() functional notation of font-variant-alternates.
stylistic: Vec<FFVDeclaration<SingleValue>>A @stylistic block. Specifies a feature name that will work with the annotation() functional notation of font-variant-alternates.
ornaments: Vec<FFVDeclaration<SingleValue>>A @ornaments block. Specifies a feature name that will work with the ornaments() ] functional notation of font-variant-alternates.
annotation: Vec<FFVDeclaration<SingleValue>>A @annotation block. Specifies a feature name that will work with the stylistic() functional notation of font-variant-alternates.
character_variant: Vec<FFVDeclaration<PairValues>>A @character-variant block. Specifies a feature name that will work with the styleset() functional notation of font-variant-alternates. The value can be a pair.
styleset: Vec<FFVDeclaration<VectorValues>>A @styleset block. Specifies a feature name that will work with the character-variant() functional notation of font-variant-alternates. The value can be a list.
source_location: SourceLocationThe line and column of the rule’s source code.
Implementations§
Source§impl FontFeatureValuesRule
impl FontFeatureValuesRule
Sourcefn new(family_names: Vec<FamilyName>, location: SourceLocation) -> Self
fn new(family_names: Vec<FamilyName>, location: SourceLocation) -> Self
Creates an empty FontFeatureValuesRule with given location and family name list.
Sourcepub fn parse(
context: &ParserContext<'_>,
input: &mut Parser<'_, '_>,
family_names: Vec<FamilyName>,
location: SourceLocation,
) -> Self
pub fn parse( context: &ParserContext<'_>, input: &mut Parser<'_, '_>, family_names: Vec<FamilyName>, location: SourceLocation, ) -> Self
Parses a FontFeatureValuesRule.
Sourcepub fn value_to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
pub fn value_to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
Prints inside of @font-feature-values block.
Trait Implementations§
Source§impl Clone for FontFeatureValuesRule
impl Clone for FontFeatureValuesRule
Source§fn clone(&self) -> FontFeatureValuesRule
fn clone(&self) -> FontFeatureValuesRule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FontFeatureValuesRule
impl Debug for FontFeatureValuesRule
Source§impl PartialEq for FontFeatureValuesRule
impl PartialEq for FontFeatureValuesRule
Source§impl ToCssWithGuard for FontFeatureValuesRule
impl ToCssWithGuard for FontFeatureValuesRule
Source§fn to_css(
&self,
_guard: &SharedRwLockReadGuard<'_>,
dest: &mut CssStringWriter,
) -> Result
fn to_css( &self, _guard: &SharedRwLockReadGuard<'_>, dest: &mut CssStringWriter, ) -> Result
self in CSS syntax, writing to dest, using the given lock guard.Source§fn to_css_string(&self, guard: &SharedRwLockReadGuard<'_>) -> CssString
fn to_css_string(&self, guard: &SharedRwLockReadGuard<'_>) -> CssString
self in CSS syntax using the given lock guard and return a string. Read moreSource§impl ToShmem for FontFeatureValuesRule
impl ToShmem for FontFeatureValuesRule
impl StructuralPartialEq for FontFeatureValuesRule
Auto Trait Implementations§
impl Freeze for FontFeatureValuesRule
impl RefUnwindSafe for FontFeatureValuesRule
impl Send for FontFeatureValuesRule
impl Sync for FontFeatureValuesRule
impl Unpin for FontFeatureValuesRule
impl UnwindSafe for FontFeatureValuesRule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more