pub struct FontFeatures { /* private fields */ }Expand description
A set of OpenType features requested for shaping.
Stack-allocated for the common case of ≤4 features.
Implementations§
Source§impl FontFeatures
impl FontFeatures
Sourcepub fn push(&mut self, feature: FontFeature)
pub fn push(&mut self, feature: FontFeature)
Add a feature to the set.
Sourcepub fn from_slice(features: &[FontFeature]) -> Self
pub fn from_slice(features: &[FontFeature]) -> Self
Create from a slice of features.
Sourcepub fn iter(&self) -> impl Iterator<Item = &FontFeature>
pub fn iter(&self) -> impl Iterator<Item = &FontFeature>
Iterate over features.
Sourcepub fn canonicalize(&mut self)
pub fn canonicalize(&mut self)
Sort features by tag for deterministic hashing.
Trait Implementations§
Source§impl Clone for FontFeatures
impl Clone for FontFeatures
Source§fn clone(&self) -> FontFeatures
fn clone(&self) -> FontFeatures
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 FontFeatures
impl Debug for FontFeatures
Source§impl Default for FontFeatures
impl Default for FontFeatures
Source§fn default() -> FontFeatures
fn default() -> FontFeatures
Returns the “default value” for a type. Read more
Source§impl Hash for FontFeatures
impl Hash for FontFeatures
Source§impl PartialEq for FontFeatures
impl PartialEq for FontFeatures
impl Eq for FontFeatures
impl StructuralPartialEq for FontFeatures
Auto Trait Implementations§
impl Freeze for FontFeatures
impl RefUnwindSafe for FontFeatures
impl Send for FontFeatures
impl Sync for FontFeatures
impl Unpin for FontFeatures
impl UnsafeUnpin for FontFeatures
impl UnwindSafe for FontFeatures
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.