pub struct TextShaper;Expand description
Pure-Rust OpenType text shaping engine.
Implementations§
Source§impl TextShaper
impl TextShaper
pub fn new() -> Self
Sourcepub fn shape_with_font_and_features(
&self,
text: &str,
font: &OpenTypeFont,
font_size: f32,
features: OpenTypeFeatures,
) -> Vec<ShapedGlyph>
pub fn shape_with_font_and_features( &self, text: &str, font: &OpenTypeFont, font_size: f32, features: OpenTypeFeatures, ) -> Vec<ShapedGlyph>
Shapes text using authentic OpenType glyph advances, kerning, and configured feature tags from an OpenTypeFont.
Sourcepub fn shape_with_font(
&self,
text: &str,
font: &OpenTypeFont,
font_size: f32,
) -> Vec<ShapedGlyph>
pub fn shape_with_font( &self, text: &str, font: &OpenTypeFont, font_size: f32, ) -> Vec<ShapedGlyph>
Shapes text using authentic OpenType glyph advances and kerning from an OpenTypeFont using default features.
Sourcepub fn shape(
&self,
text: &str,
metrics: &FontMetrics,
is_monospace: bool,
) -> Vec<ShapedGlyph>
pub fn shape( &self, text: &str, metrics: &FontMetrics, is_monospace: bool, ) -> Vec<ShapedGlyph>
Shapes a text run into positioned glyphs, applying ligatures and pair kerning.
Trait Implementations§
Auto Trait Implementations§
impl Forget for TextShaper
impl Freeze for TextShaper
impl Move for TextShaper
impl RefUnwindSafe for TextShaper
impl Send for TextShaper
impl Sync for TextShaper
impl Unpin for TextShaper
impl UnsafeUnpin for TextShaper
impl UnwindSafe for TextShaper
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