bevy/crates/bevy_text
xtr3m3nerd b6efe0f318 Limit FontAtlasSets (#5708)
# Objective

Fixes #5636
Summary: The FontAtlasSet caches generated font textures per font size. Since font size can be any arbitrary floating point number it is possible for the user to generate thousands of font texture inadvertently by changing the font size over time. This results in a memory leak as these generated font textures fill the available memory. 

## Solution

We limit the number of possible font sizes that we will cache and throw an error if the user attempts to generate more. This error encourages the user to use alternative, less performance intensive methods to accomplish the same goal. If the user requires more font sizes and the alternative solutions wont work there is now a TextSettings Resource that the user can set to configure this limit. 

---

## Changelog

The number of cached font sizes per font is now limited with a default limit of 100 font sizes per font. This limit is configurable via the new TextSettings struct.
2022-09-19 16:12:12 +00:00
..
src Limit FontAtlasSets (#5708) 2022-09-19 16:12:12 +00:00
Cargo.toml Bump Version after Release (#5576) 2022-08-05 02:03:05 +00:00