pub struct MorphOptions {
pub word_match_start: bool,
pub word_match_end: bool,
}Expand description
Options for morphing a font.
Fields§
§word_match_start: boolWhether to require a word boundary before the matched source word.
§Example
Say we want to morph “banana” to “orange”. With start matching enabled,
xbanana will not be affected; with it disabled, xbanana can be
rendered as xorange.
word_match_end: boolWhether to require a word boundary after the matched source word.
§Example
Say we want to morph “banana” to “orange”. With end matching enabled,
bananas will not be affected; with it disabled, bananas can be
rendered as oranges.
Implementations§
Source§impl MorphOptions
impl MorphOptions
Sourcepub fn new(word_match_start: bool, word_match_end: bool) -> Self
pub fn new(word_match_start: bool, word_match_end: bool) -> Self
Creates a new MorphOptions.
Trait Implementations§
Source§impl Clone for MorphOptions
impl Clone for MorphOptions
Source§fn clone(&self) -> MorphOptions
fn clone(&self) -> MorphOptions
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 MorphOptions
impl Debug for MorphOptions
Source§impl Default for MorphOptions
impl Default for MorphOptions
Source§impl PartialEq for MorphOptions
impl PartialEq for MorphOptions
impl Eq for MorphOptions
impl StructuralPartialEq for MorphOptions
Auto Trait Implementations§
impl Freeze for MorphOptions
impl RefUnwindSafe for MorphOptions
impl Send for MorphOptions
impl Sync for MorphOptions
impl Unpin for MorphOptions
impl UnsafeUnpin for MorphOptions
impl UnwindSafe for MorphOptions
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§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.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>
Converts
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>
Converts
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 moreSource§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§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.