Module layout
Available on crate feature
dep_fontdue
only.Expand description
Tools for laying out strings of text.
Structs§
- Character
Data - Miscellaneous metadata associated with a character to assist in layout.
- Glyph
Position - A positioned scaled glyph.
- Glyph
Raster Config - 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.
- Layout
Settings - 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.
- Line
Position - Metrics about a positioned line.
- Text
Style - A style description for a segment of text.
Enums§
- Coordinate
System - The direction that the Y coordinate increases in. Layout needs to be aware of your coordinate system to place the glyphs correctly.
- Horizontal
Align - Horizontal alignment options for text when a max_width is provided.
- Vertical
Align - Vertical alignment options for text when a max_height is provided.
- Wrap
Style - 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.