Struct sdl2::ttf::Font

source · []
pub struct Font<'ttf_module, 'rwops> { /* private fields */ }
Expand description

A loaded TTF font.

Implementations

Starts specifying a rendering of the given UTF-8-encoded text.

Starts specifying a rendering of the given Latin-1-encoded text.

Starts specifying a rendering of the given UTF-8-encoded character.

Returns the width and height of the given text when rendered using this font.

Returns the width and height of the given text when rendered using this font.

Returns the width and height of the given text when rendered using this font.

Returns the font’s style flags.

Sets the font’s style flags.

Returns the width of the font’s outline.

Sets the width of the font’s outline.

Returns the font’s freetype hints.

Sets the font’s freetype hints.

Returns whether the font is kerning.

Sets whether the font should use kerning.

Get font maximum total height.

Returns the font’s highest ascent (height above base).

Returns the font’s lowest descent (height below base). This is a negative number.

Returns the recommended line spacing for text rendered with this font.

Returns the number of faces in this font.

Returns whether the font is monospaced.

Returns the family name of the current font face.

Returns the name of the current font face.

Returns the index of the given character in this font face.

Returns the glyph metrics of the given character in this font face.

Trait Implementations

Executes the destructor for this type. 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.