mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 14:08:32 +00:00
Improve font size related docs (#9320)
# Objective Fixes #7273 Closes #7578 This PR also drive-by fixes a broken doc link.
This commit is contained in:
parent
d9702d35f1
commit
90f77beca2
2 changed files with 9 additions and 2 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -167,6 +167,13 @@ impl From<TextAlignment> for glyph_brush_layout::HorizontalAlign {
|
|||
#[derive(Clone, Debug, Reflect)]
|
||||
pub struct TextStyle {
|
||||
pub font: Handle<Font>,
|
||||
/// 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,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue