Expand description
Contains functions for breaking a string into words, calculate the positions of words / lines and do glyph positioning
Structs§
- Info about what cluster a certain glyph belongs to.
- Iterator over glyphs that returns information about the cluster that this glyph belongs to. Returned by the
ScaledWord::cluster_iter()
function. - Returns the layouted glyph instances
- Same as
TextLayoutOptions
, but with the widths / heights of thePixelValue
s resolved to regular f32s (becauseletter_spacing
,word_spacing
, etc. may be %-based value) - Word that is scaled (to a font / font instance), but not yet positioned
- A paragraph of words that are shaped and scaled (* but not yet layouted / positioned*!) according to their final size in pixels.
- Layout options that can impact the flow of word positions
- Section of a certain type
- Stores the positions of the vertically laid out texts
- Text broken up into
Tab
,Word()
,Return
characters
Enums§
- Whether the text overflows the parent rectangle, and if yes, by how many pixels, necessary for determining if / how to show a scrollbar + aligning / centering text.
- Either a white-space delimited word, tab or return character
Constants§
Functions§
- Check if the caret intersects with any holes and if yes, if the cursor should move to a new line.
- For a given line number (NOTE: 0-indexed!), calculates the Y position of the bottom left corner
- Positions the words on the screen (does not layout any glyph positions!), necessary for estimating the intrinsic width + height of the text content.
- Splits the text by whitespace into logical units (word, tab, return, whitespace).
- Returns the (left-aligned!) bounding boxes of the indidividual text lines
- Takes a text broken into semantic items and a font instance and scales the font accordingly.