Struct fontdue::layout::CharacterData
source · [−]pub struct CharacterData { /* private fields */ }
Expand description
Miscellaneous metadata associated with a character to assist in layout.
Implementations
sourceimpl 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
sourceimpl Clone for CharacterData
impl Clone for CharacterData
sourcefn clone(&self) -> CharacterData
fn clone(&self) -> CharacterData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CharacterData
impl Debug for CharacterData
sourceimpl PartialEq<CharacterData> for CharacterData
impl PartialEq<CharacterData> for CharacterData
sourcefn eq(&self, other: &CharacterData) -> bool
fn eq(&self, other: &CharacterData) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CharacterData) -> bool
fn ne(&self, other: &CharacterData) -> bool
This method tests for !=
.
impl Copy for CharacterData
impl Eq for CharacterData
impl StructuralEq for CharacterData
impl StructuralPartialEq for CharacterData
Auto Trait Implementations
impl RefUnwindSafe for CharacterData
impl Send for CharacterData
impl Sync for CharacterData
impl Unpin for CharacterData
impl UnwindSafe for CharacterData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more