Struct swash::Charmap[][src]

pub struct Charmap<'a> { /* fields omitted */ }

Maps characters to nominal glyph identifiers.

Implementations

impl<'a> Charmap<'a>[src]

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

Creates a character map from the specified font.

pub fn proxy(&self) -> CharmapProxy[src]

Returns the associated proxy.

pub fn map(&self, codepoint: impl Into<u32>) -> GlyphId[src]

Returns a nominal glyph identifier for the specified codepoint.

pub fn enumerate(&self, f: impl FnMut(u32, GlyphId))[src]

Invokes the specified closure with all codepoint/glyph identifier pairs in the character map.

Trait Implementations

impl<'a> Clone for Charmap<'a>[src]

impl<'a> Copy for Charmap<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Charmap<'a>

impl<'a> Send for Charmap<'a>

impl<'a> Sync for Charmap<'a>

impl<'a> Unpin for Charmap<'a>

impl<'a> UnwindSafe for Charmap<'a>

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.