pub struct ShapeContext { /* private fields */ }
Expand description
Context that manages caches and transient buffers for shaping.
See the module level documentation for detail.
Implementations§
source§impl ShapeContext
impl ShapeContext
sourcepub fn with_max_entries(max_entries: usize) -> Self
pub fn with_max_entries(max_entries: usize) -> Self
Creates a new shaping context with the specified maximum number of cache entries.
sourcepub fn builder<'a>(
&'a mut self,
font: impl Into<FontRef<'a>>,
) -> ShaperBuilder<'a>
pub fn builder<'a>( &'a mut self, font: impl Into<FontRef<'a>>, ) -> ShaperBuilder<'a>
Creates a new builder for constructing a shaper with this context and the specified font.
sourcepub fn builder_with_id<'a>(
&'a mut self,
font: impl Into<FontRef<'a>>,
id: [u64; 2],
) -> ShaperBuilder<'a>
pub fn builder_with_id<'a>( &'a mut self, font: impl Into<FontRef<'a>>, id: [u64; 2], ) -> ShaperBuilder<'a>
Creates a new builder for constructing a shaper with this context and the specified font.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShapeContext
impl RefUnwindSafe for ShapeContext
impl Send for ShapeContext
impl Sync for ShapeContext
impl Unpin for ShapeContext
impl UnwindSafe for ShapeContext
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