Struct rusttype::HMetrics [] [src]

pub struct HMetrics {
    pub advance_width: f32,
    pub left_side_bearing: f32,
}

The "horizontal metrics" of a glyph. This is useful for calculating the horizontal offset of a glyph from the previous one in a string when laying a string out horizontally.

Fields

advance_width

The horizontal offset that the origin of the next glyph should be from the origin of this glyph.

left_side_bearing

The horizontal offset between the origin of this glyph and the leftmost edge/point of the glyph.

Trait Implementations

Derived Implementations

impl PartialOrd for HMetrics

fn partial_cmp(&self, __arg_0: &HMetrics) -> Option<Ordering>

fn lt(&self, __arg_0: &HMetrics) -> bool

fn le(&self, __arg_0: &HMetrics) -> bool

fn gt(&self, __arg_0: &HMetrics) -> bool

fn ge(&self, __arg_0: &HMetrics) -> bool

impl PartialEq for HMetrics

fn eq(&self, __arg_0: &HMetrics) -> bool

fn ne(&self, __arg_0: &HMetrics) -> bool

impl Debug for HMetrics

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for HMetrics

fn clone(&self) -> HMetrics

1.0.0fn clone_from(&mut self, source: &Self)

impl Copy for HMetrics