Module speedy2d::font[][src]

Components for loading fonts and laying out text.

Structs

Codepoint

A struct representing a Unicode codepoint, for the purposes of text layout. The user_index field allows you to determine which output glyph corresponds to which input codepoint.

Font

A struct representing a font.

FontFamily

A collection of fonts, in decreasing order of priority. When laying out text, if a codepoint cannot be found in the first font in the list, the subsequent fonts will also be searched.

FontGlyph

A struct representing a glyph in a font.

FormattedGlyph

Represents a glyph which has been laid out as part of a line of text.

FormattedTextBlock

Represents a block of text which has been laid out.

FormattedTextLine

Represents a line of text which has been laid out as part of a block.

TextOptions

A series of options for specifying how text should be laid out.

Enums

TextAlignment

The horizontal alignment of a block of text. This can be set when calling TextOptions::with_wrap_words_after_width.

Traits

TextLayout

Objects implementing this trait are able to lay out text, ready for rendering.

Type Definitions

FontId

An internal identifier for a font. Each font which is loaded receives a unique ID.

UserGlyphIndex

Type of the Codepoint::user_index and FormattedGlyph::user_index fields.