Struct swash::proxy::MetricsProxy[][src]

pub struct MetricsProxy { /* fields omitted */ }

Proxy for rematerializing metrics.

Implementations

impl MetricsProxy[src]

pub fn from_font(font: &FontRef<'_>) -> Self[src]

Creates a metrics proxy for the specified font.

pub fn materialize_metrics(
    &self,
    font: &FontRef<'_>,
    coords: &[NormalizedCoord]
) -> Metrics
[src]

Materializes font metrics for the specified font and normalized variation coordinates. This proxy must have been created from the same font.

pub fn materialize_glyph_metrics<'a>(
    &self,
    font: &FontRef<'a>,
    coords: &'a [NormalizedCoord]
) -> GlyphMetrics<'a>
[src]

Materializes glyph metrics for the specified font and normalized variation coordinates. This proxy must have been created from the same font.

pub fn units_per_em(&self) -> u16[src]

Returns the number of font design units per em unit.

pub fn glyph_count(&self) -> u16[src]

Returns the number of glyphs in the font.

Trait Implementations

impl Clone for MetricsProxy[src]

impl Copy for MetricsProxy[src]

impl Default for MetricsProxy[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.