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: SourceLocation
The 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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