diff --git a/crates/bevy_text/src/lib.rs b/crates/bevy_text/src/lib.rs index cdd4f6fd31..410dbb2cfa 100644 --- a/crates/bevy_text/src/lib.rs +++ b/crates/bevy_text/src/lib.rs @@ -41,9 +41,9 @@ pub struct TextPlugin; /// [`TextPlugin`] settings #[derive(Resource)] pub struct TextSettings { - /// Maximum number of font atlases supported in a ['FontAtlasSet'] + /// Maximum number of font atlases supported in a [`FontAtlasSet`]. pub max_font_atlases: NonZeroUsize, - /// Allows font size to be set dynamically exceeding the amount set in max_font_atlases. + /// Allows font size to be set dynamically exceeding the amount set in `max_font_atlases`. /// Note each font size has to be generated which can have a strong performance impact. pub allow_dynamic_font_size: bool, } diff --git a/crates/bevy_text/src/text.rs b/crates/bevy_text/src/text.rs index 00713800bd..c231b6ed99 100644 --- a/crates/bevy_text/src/text.rs +++ b/crates/bevy_text/src/text.rs @@ -167,6 +167,13 @@ impl From for glyph_brush_layout::HorizontalAlign { #[derive(Clone, Debug, Reflect)] pub struct TextStyle { pub font: Handle, + /// The vertical height of rasterized glyphs in the font atlas in pixels. + /// + /// This is multiplied by the window scale factor and `UiScale`, but not the text entity + /// transform or camera projection. + /// + /// A new font atlas is generated for every combination of font handle and scaled font size + /// which can have a strong performance impact. pub font_size: f32, pub color: Color, }