Expand description
Text drawing, styling, and font assets.
Modules
Structs
- The maximum width and height of text. The text will wrap according to the specified size. Characters out of the bounds after wrapping will be truncated. Text is aligned according to the specified
JustifyText
. - The bundle of components needed to draw text in a 2D scene via a 2D
Camera2dBundle
. Example usage. - Render information for a corresponding
Text
component. - Adds text rendering support to an app.
- Settings used to configure the
TextPlugin
.
Enums
- Determines how lines will be broken when preventing text from running out of bounds.
- Possible errors that can be produced by
FontLoader
- Describes the horizontal alignment of multiple lines of text relative to each other. This only affects the internal positioning of the lines of text within a text entity and does not affect the text entity’s position.
- Text is rendered for two different view projections, a
Text2dBundle
is rendered with aBottomToTop
y axis, while UI is rendered with aTopToBottom
y axis. This matters for text because the glyph positioning is different in either layout.
Functions
- This system extracts the sprites from the 2D text components and adds them to the “render world”.
- Scales
value
byfactor
. - Updates the layout and size information whenever the text or style is changed. This information is computed by the
TextPipeline
on insertion, then stored.