Struct swash::shape::Shaper[][src]

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

Maps character clusters to positioned glyph clusters according to typographic rules and features.

See the module level documentation for detail.

Implementations

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

pub fn add_cluster(&mut self, cluster: &CharCluster)[src]

Adds a character cluster to the shaper.

pub fn add_str(&mut self, s: &str)[src]

Adds a string to the shaper.

pub fn normalized_coords(&self) -> &[NormalizedCoord]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns the current normalized variation coordinates in use by the shaper.

pub fn metrics(&self) -> Metrics[src]

Returns the current font metrics in use by the shaper.

pub fn shape_with(self, f: impl FnMut(&GlyphCluster<'_>))[src]

Shapes the text and invokes the specified closure with each resulting glyph cluster.

Auto Trait Implementations

impl<'a> RefUnwindSafe for Shaper<'a>

impl<'a> Send for Shaper<'a>

impl<'a> Sync for Shaper<'a>

impl<'a> Unpin for Shaper<'a>

impl<'a> !UnwindSafe for Shaper<'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, 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.