pub struct TextLayouter { /* private fields */ }Expand description
Lays paragraphs out. Keeps its itemizer, shaper, line breaker and scratch storage from one layout to the next.
Implementations§
Source§impl TextLayouter
impl TextLayouter
Sourcepub fn layout(
&mut self,
input: &LayoutInput<'_>,
resolver: &FontFamilyResolver,
) -> TextLayout
pub fn layout( &mut self, input: &LayoutInput<'_>, resolver: &FontFamilyResolver, ) -> TextLayout
Lays input out with the typefaces of resolver.
Sourcepub fn relayout(
&mut self,
input: &LayoutInput<'_>,
resolver: &FontFamilyResolver,
shaped: &TextLayout,
) -> TextLayout
pub fn relayout( &mut self, input: &LayoutInput<'_>, resolver: &FontFamilyResolver, shaped: &TextLayout, ) -> TextLayout
Lays input out as TextLayouter::layout does, with the glyphs
shaped placed for the same text in the same typefaces in place of
shaping it again.
Sourcepub fn layout_into(
&mut self,
input: &LayoutInput<'_>,
resolver: &FontFamilyResolver,
layout: &mut TextLayout,
)
pub fn layout_into( &mut self, input: &LayoutInput<'_>, resolver: &FontFamilyResolver, layout: &mut TextLayout, )
Lays input out into layout in place of what it held, in the
storage of its lines and runs when no copy of it shares them.
Sourcepub fn intrinsics(
&mut self,
input: &LayoutInput<'_>,
resolver: &FontFamilyResolver,
) -> ParagraphIntrinsics
pub fn intrinsics( &mut self, input: &LayoutInput<'_>, resolver: &FontFamilyResolver, ) -> ParagraphIntrinsics
The intrinsic widths of input, laid out with the typefaces of
resolver; its width and options do not count.
Sourcepub fn set_memory_headroom(&mut self, headroom: MemoryHeadroom)
pub fn set_memory_headroom(&mut self, headroom: MemoryHeadroom)
Sizes the caches the layouter keeps by how much memory the device has left: tight memory takes them back to their least.
Sourcepub fn hyphenator_mut(&mut self) -> &mut Hyphenator
pub fn hyphenator_mut(&mut self) -> &mut Hyphenator
The dictionaries Hyphens.Auto hyphenates words by.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TextLayouter
impl !RefUnwindSafe for TextLayouter
impl !Sync for TextLayouter
impl !UnwindSafe for TextLayouter
impl Forget for TextLayouter
impl Move for TextLayouter
impl Send for TextLayouter
impl Unpin for TextLayouter
impl UnsafeUnpin for TextLayouter
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