pub struct TextShaper { /* private fields */ }Expand description
A class that is responsible for text shaping.
Implementations§
Source§impl TextShaper
impl TextShaper
pub fn new(platform_impl: Rc<dyn ITextShaperImpl>) -> Self
Sourcepub fn current() -> Rc<TextShaper>
pub fn current() -> Rc<TextShaper>
Gets the current text shaper.
Panics when no text shaper backend is registered.
Sourcepub fn shape_text(
&self,
text: &ReadOnlyMemory<u16>,
options: &TextShaperOptions,
) -> Rc<ShapedBuffer>
pub fn shape_text( &self, text: &ReadOnlyMemory<u16>, options: &TextShaperOptions, ) -> Rc<ShapedBuffer>
Shapes UTF-16 text.
Sourcepub fn shape_str(
&self,
text: &str,
options: &TextShaperOptions,
) -> Rc<ShapedBuffer>
pub fn shape_str( &self, text: &str, options: &TextShaperOptions, ) -> Rc<ShapedBuffer>
Shapes a string.
Auto Trait Implementations§
impl !RefUnwindSafe for TextShaper
impl !Send for TextShaper
impl !Sync for TextShaper
impl !UnwindSafe for TextShaper
impl Freeze for TextShaper
impl Unpin for TextShaper
impl UnsafeUnpin 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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more