pub struct Features(/* private fields */);Expand description
The OpenType features a run is shaped with, beyond the ones the shaper turns on for every run.
These travel on the run. A painter that draws glyphs has them already; one that draws characters has to ask the face for the same features, or it draws different glyphs at the positions the engine measured.
A book is set in a handful of these and holds hundreds of thousands of runs, so the runs share one set rather than each carrying a list of its own.
Implementations§
Source§impl Features
impl Features
Sourcepub fn new(small_caps: bool, settings: Vec<FeatureSetting>) -> Features
pub fn new(small_caps: bool, settings: Vec<FeatureSetting>) -> Features
The features of one run: smcp where the face draws the small
capitals, and whatever the sheet asked for.
Sourcepub fn small_caps(&self) -> bool
pub fn small_caps(&self) -> bool
Whether the run is set in the face’s own small capitals.
Sourcepub fn settings(&self) -> &[FeatureSetting]
pub fn settings(&self) -> &[FeatureSetting]
What the sheet asked for, in the order the shaper reads it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Features
impl<'de> Deserialize<'de> for Features
Source§fn deserialize<D: Deserializer<'de>>(
deserializer: D,
) -> Result<Features, D::Error>
fn deserialize<D: Deserializer<'de>>( deserializer: D, ) -> Result<Features, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Features
impl StructuralPartialEq for Features
Auto Trait Implementations§
impl Freeze for Features
impl RefUnwindSafe for Features
impl Send for Features
impl Sync for Features
impl Unpin for Features
impl UnsafeUnpin for Features
impl UnwindSafe for Features
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.