pub struct CharacterData { /* private fields */ }Expand description
Miscellaneous metadata associated with a character to assist in layout.
Implementations§
Source§impl CharacterData
impl CharacterData
Sourcepub fn classify(c: char, index: u16) -> CharacterData
pub fn classify(c: char, index: u16) -> CharacterData
Classifies a character given its index in the font.
Sourcepub fn rasterize(&self) -> bool
pub fn rasterize(&self) -> bool
A heuristic for if the glpyh this was classified from should be rasterized. Missing glyphs, whitespace, and control characters will return false.
Sourcepub fn is_whitespace(&self) -> bool
pub fn is_whitespace(&self) -> bool
Marks if the character is an ASCII whitespace character.
Sourcepub fn is_control(&self) -> bool
pub fn is_control(&self) -> bool
Marks if the character is an ASCII control character.
Sourcepub fn is_missing(&self) -> bool
pub fn is_missing(&self) -> bool
Marks if the character is missing from its associated font.
Trait Implementations§
Source§impl Clone for CharacterData
impl Clone for CharacterData
Source§fn clone(&self) -> CharacterData
fn clone(&self) -> CharacterData
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 CharacterData
impl Debug for CharacterData
Source§impl PartialEq for CharacterData
impl PartialEq for CharacterData
impl Copy for CharacterData
impl Eq for CharacterData
impl StructuralPartialEq for CharacterData
Auto Trait Implementations§
impl Freeze for CharacterData
impl RefUnwindSafe for CharacterData
impl Send for CharacterData
impl Sync for CharacterData
impl Unpin for CharacterData
impl UnwindSafe for CharacterData
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§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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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 more