Struct CharacterMetric
pub struct CharacterMetric<'a> {
pub code: CharacterCode<'a>,
pub name: Option<Cow<'a, str>>,
pub advances: [Option<Vector>; 2],
pub bbox: Option<BBox>,
pub v_vector: Option<Vector>,
pub ligatures: Cow<'a, [Ligature<'a>]>,
}Expand description
One character record; missing advances stay absent until resolved against the font.
Fields§
§code: CharacterCode<'a>Required C or CH encoding value.
name: Option<Cow<'a, str>>Optional glyph name (N), without encoding interpretation.
advances: [Option<Vector>; 2]Authored advance vectors for directions 0 and 1, respectively.
bbox: Option<BBox>Optional glyph bounding box (B).
v_vector: Option<Vector>Per-glyph vertical origin displacement (VV).
ligatures: Cow<'a, [Ligature<'a>]>All authored ligature rules.
Implementations§
§impl CharacterMetric<'_>
impl CharacterMetric<'_>
pub fn into_owned(self) -> CharacterMetric<'static>
pub fn into_owned(self) -> CharacterMetric<'static>
Detach the code, name, and every ligature from their source.
Trait Implementations§
§impl<'a> Clone for CharacterMetric<'a>
impl<'a> Clone for CharacterMetric<'a>
§fn clone(&self) -> CharacterMetric<'a>
fn clone(&self) -> CharacterMetric<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl<'a> Debug for CharacterMetric<'a>
impl<'a> Debug for CharacterMetric<'a>
§impl<'a> PartialEq for CharacterMetric<'a>
impl<'a> PartialEq for CharacterMetric<'a>
§fn eq(&self, other: &CharacterMetric<'a>) -> bool
fn eq(&self, other: &CharacterMetric<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for CharacterMetric<'a>
Auto Trait Implementations§
impl<'a> Freeze for CharacterMetric<'a>
impl<'a> RefUnwindSafe for CharacterMetric<'a>
impl<'a> Send for CharacterMetric<'a>
impl<'a> Sync for CharacterMetric<'a>
impl<'a> Unpin for CharacterMetric<'a>
impl<'a> UnsafeUnpin for CharacterMetric<'a>
impl<'a> UnwindSafe for CharacterMetric<'a>
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