Struct fontdue::layout::CharacterData
source · 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 copy 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
source§fn 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 ==
.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§
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