[][src]Module fontdue::layout

Tools for laying out strings of text.

Structs

GlyphPosition

A positioned scaled glyph.

GlyphRasterConfig

Configuration for rasterizing a glyph. This struct is also a hashable key that can be used to uniquely identify a rasterized glyph for applications that want to cache glyphs.

Layout

Text layout requires a small amount of heap usage which is contained in the Layout struct. This context is reused between layout calls. Reusing the Layout struct will greatly reduce memory allocations and is advisable for performance.

LayoutSettings

Settings to configure how text layout is constrained. Text layout is considered best effort and layout may violate the constraints defined here if they prevent text from being laid out.

TextStyle

A style description for a segment of text.

Enums

HorizontalAlign

Horizontal alignment options for text when a max_width is provided.

VerticalAlign

Vertical alignment options for text when a max_height is provided.

WrapStyle

Wrap style is a hint for how strings of text should be wrapped to the next line. Line wrapping can happen when the max width/height is reached.