Struct pane::Glyphs

source ·
pub struct Glyphs<'f, S = f64>where
    S: Scalar,
{ /* private fields */ }
Expand description

A basic implememntor for CharacterWidthCache

Implementations

Loads a Glyphs from an array of font data.

Loads a Glyphs from a Font.

Trait Implementations

The scalar type for the width
Get the width of a character at a font size
Get the width of a string at a font_size
Split a string into a list of lines of text with the given format where no line is wider than the given max width. Newlines (\n) in the string are respected Read more
Get the width of the widest line after performing the calculation of CharacterWidthCache::format_lines Read more
Calculate a set of positioned lines of text with the given format that fit within the given rectangle Read more
Check if text with the given format fits within a rectangle’s width
Check if text with the given format fits within a rectangle’s height
Check if text with the given format fits within a rectangle
Determine the maximum font size for text with the given format that will still allow the text to fit within a rectangle Read more
Determine the minumum height for a rectangle such that text with the given format will still fit within the rectangle Read more
Determine the minumum width for a rectangle such that text with the given format will still fit within the rectangle Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. 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

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Sets value as a parameter of self.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.