pub struct TextContourSession<'a> { /* private fields */ }Expand description
One validated font face, shaped and outlined unhinted, reusable for every run of plain text in it: the font buffer is checked against its declared identity (SHA-256, face, variations) once, when the session is built, not once per run. Each run’s input must name the same identity.
Implementations§
Source§impl<'a> TextContourSession<'a>
impl<'a> TextContourSession<'a>
Sourcepub fn new(
font_bytes: &'a [u8],
shaping: &ShapingInput,
) -> Result<TextContourSession<'a>, TextContourError>
pub fn new( font_bytes: &'a [u8], shaping: &ShapingInput, ) -> Result<TextContourSession<'a>, TextContourError>
Validate font_bytes against shaping’s font identity and prepare
the face.
Sourcepub fn shape(
&self,
request: TextContourRequest<'_>,
) -> Result<TextContourOutput, TextContourError>
pub fn shape( &self, request: TextContourRequest<'_>, ) -> Result<TextContourOutput, TextContourError>
shape_text_contours_a0 for one run in this session’s face.
Auto Trait Implementations§
impl<'a> !Freeze for TextContourSession<'a>
impl<'a> RefUnwindSafe for TextContourSession<'a>
impl<'a> Send for TextContourSession<'a>
impl<'a> Sync for TextContourSession<'a>
impl<'a> Unpin for TextContourSession<'a>
impl<'a> UnsafeUnpin for TextContourSession<'a>
impl<'a> UnwindSafe for TextContourSession<'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