Struct egui::text::Fonts[][src]

pub struct Fonts { /* fields omitted */ }
Expand description

The collection of fonts used by epaint.

Required in order to paint text.

Implementations

Create a new Fonts for text layout. This call is expensive, so only create on Fonts and then reuse it.

👎 Deprecated:

Renamed to Fonts::new

Call each frame to get the latest available font texture data.

Width of this character in points.

Height of one row of text. In points

Layout some text. This is the most advanced layout function. See also Self::layout, Self::layout_no_wrap and Self::layout_delayed_color.

The implementation uses memoization so repeated calls are cheap.

Will wrap text at the given width and line break at \n.

The implementation uses memoization so repeated calls are cheap.

Will line break at \n.

The implementation uses memoization so repeated calls are cheap.

Like Self::layout, made for when you want to pick a color for the text later.

The implementation uses memoization so repeated calls are cheap.

Must be called once per frame to clear the Galley cache.

Trait Implementations

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.