pub fn text_system(
textures: ResMut<'_, Assets<Image>>,
fonts: Res<'_, Assets<Font>>,
texture_atlases: ResMut<'_, Assets<TextureAtlasLayout>>,
font_atlas_sets: ResMut<'_, FontAtlasSets>,
text_pipeline: ResMut<'_, TextPipeline>,
text_query: Query<'_, '_, (Entity, Ref<'_, ComputedNode>, &TextLayout, &mut TextLayoutInfo, &mut TextNodeFlags, &mut ComputedTextBlock)>,
text_reader: TextUiReader<'_, '_>,
font_system: ResMut<'_, CosmicFontSystem>,
swash_cache: ResMut<'_, SwashCache>,
)
Expand description
Updates the layout and size information for a UI text node on changes to the size value of its Node
component,
or when the needs_recompute
field of TextNodeFlags
is set to true.
This information is computed by the TextPipeline
and then stored in TextLayoutInfo
.
§World Resources
ResMut<Assets<Image>>
– This system only adds new Image
assets.
It does not modify or observe existing ones. The exception is when adding new glyphs to a bevy_text::FontAtlas
.