mirror of
https://github.com/bevyengine/bevy
synced 2024-11-14 00:47:32 +00:00
d1528dfbf8
# Objective Fixes #6642 In a way that doesn't create any breaking changes, as a possible way to fix the above in a patch release. ## Solution Don't actually remove font atlases when `max_font_atlases` is exceeded. Add a warning instead. Keep `TextError::ExceedMaxTextAtlases` and `TextSettings` as-is so we don't break anything. This is a bit of a cop-out, but the problems revealed by #6642 seem very challenging to fix properly. Maybe follow up later with something more like https://github.com/rparrett/bevy/commits/remove-max-font-atlases later, if this is the direction we want to go. ## Note See previous attempt at a "simple fix" that only solved some of the issues: #6666
434 B
434 B
B0005
A runtime warning.
Separate font atlases are created for each font and font size. This is expensive, and the memory is never reclaimed when e.g. interpolating TextStyle::font_size
or UiScale::scale
.
If you need to smoothly scale font size, use Transform::scale
.
You can disable this warning by setting TextSettings::allow_dynamic_font_size
to true
or raise the limit by setting TextSettings::max_font_atlases
.