Skip to main content

TextLayouter

Struct TextLayouter 

Source
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

Source

pub fn layout( &mut self, input: &LayoutInput<'_>, resolver: &FontFamilyResolver, ) -> TextLayout

Lays input out with the typefaces of resolver.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn hyphenator_mut(&mut self) -> &mut Hyphenator

The dictionaries Hyphens.Auto hyphenates words by.

Trait Implementations§

Source§

impl Default for TextLayouter

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.