Module nannou::text [−][src]
Text layout logic.
Currently, this crate is used primarily by the draw.text()
API but will also play an
important role in future GUI work.
Re-exports
pub use self::layout::Layout; |
Modules
cursor | Logic related to the positioning of the cursor within text. |
font | The |
glyph | Logic and types specific to individual glyph layout. |
layout | Items related to the styling of text. |
line | Text handling logic related to individual lines of text. |
rt | Re-exported RustType geometric types. |
Structs
Builder | A context for building some Text. |
Glyph | A single glyph of a font. this may either be a thin wrapper referring to the font and the glyph id, or it may be a standalone glyph that owns the data needed by it. |
GlyphCache | An implementation of a dynamic GPU glyph cache. See the module documentation for more information. |
GlyphId | Represents a glyph identifier for a particular font. This identifier will not necessarily correspond to the correct glyph in a font other than the one that it was obtained from. |
GlyphIter | |
LayoutIter | |
Lines | An iterator yielding each line within the given |
Scale | Defines the size of a rendered face of a font, in pixels, horizontally and
vertically. A vertical scale of |
ScaledGlyph | A glyph augmented with scaling information. You can query such a glyph for information that depends on the scale of the glyph. |
Text | An instance of some multi-line text and its layout. |
TextLineRects | An alias for the line rect iterator yielded by |
Enums
Align | Alignment along an axis. |
Justify | A type used for referring to typographic alignment of |
Wrap | The way in which text should wrap around the width. |
Functions
exact_height | Determine the exact height of a block of text. |
f32_pt_to_px | Converts the given font size in “points” to its font size in pixels. This is useful for when the font size is not an integer. |
f32_pt_to_scale | Converts the given font size in “points” to a uniform |
height_by_lines | Determine the total height of a block of text with the given number of lines, font size and
|
lines | Produce an iterator yielding each line within the given |
position_offset | The position offset required to shift the associated text into the given bounding rectangle. |
pt_to_px | Converts the given font size in “points” to its font size in pixels. |
pt_to_scale | Converts the given font size in “points” to a uniform |
rt_positioned_glyphs | Produce the position of each glyph ready for the rusttype glyph cache. |
text | Begin building a Text instance. |
Type Definitions
Font | The RustType |
FontCollection | The RustType |
FontSize | The type used to specify |
Point | The point type used when working with text. |
PositionedGlyph | The RustType |
Scalar | The type used for scalar values. |
TextGlyphs | An alias for the iterator yielded by |
TextGlyphsPerLine | An alias for the iterator yielded by |
TextLineInfos | An alias for the line info iterator yielded by |
TextLines | An alias for the line iterator yielded by |
TextLinesWithRects | An alias for the iterator yielded by |