pub struct Shaper<'a> { /* private fields */ }
Expand description
Maps character clusters to positioned glyph clusters according to typographic rules and features.
See the module level documentation for detail.
Implementations§
source§impl<'a> Shaper<'a>
impl<'a> Shaper<'a>
sourcepub fn add_cluster(&mut self, cluster: &CharCluster)
pub fn add_cluster(&mut self, cluster: &CharCluster)
Adds a character cluster to the shaper.
sourcepub fn normalized_coords(&self) -> &[NormalizedCoord]
pub fn normalized_coords(&self) -> &[NormalizedCoord]
Returns the current normalized variation coordinates in use by the shaper.
sourcepub fn shape_with(self, f: impl FnMut(&GlyphCluster<'_>))
pub fn shape_with(self, f: impl FnMut(&GlyphCluster<'_>))
Shapes the text and invokes the specified closure with each resulting glyph cluster.
Auto Trait Implementations§
impl<'a> Freeze for Shaper<'a>
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§
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