pub struct Shaper { /* private fields */ }Expand description
Shapes items with HarfRust. Keeps, for each typeface instance it met, the shaping font and its shape plans, the words it shaped where the font lets words shape apart, and one glyph buffer for every call.
Implementations§
Source§impl Shaper
impl Shaper
Sourcepub fn shape(
&mut self,
text: &str,
item: &TextItem<'_>,
span: &ShapingSpan<'_>,
context: Range<usize>,
glyphs: &mut ShapedGlyphs,
)
pub fn shape( &mut self, text: &str, item: &TextItem<'_>, span: &ShapingSpan<'_>, context: Range<usize>, glyphs: &mut ShapedGlyphs, )
Shapes item of text in span and appends its glyphs to glyphs,
in the order they are drawn from left to right. The text of context
around the item is the shaping context, so joining and contextual
forms carry across item edges inside it.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Shaper
impl !RefUnwindSafe for Shaper
impl !Sync for Shaper
impl !UnwindSafe for Shaper
impl Forget for Shaper
impl Move for Shaper
impl Send for Shaper
impl Unpin for Shaper
impl UnsafeUnpin for Shaper
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