# Objective Both `set_metrics` and `set_size` **can** trigger text re-layout and re-shaping, if the values provided are different form what is already in the `Buffer`. ## Solution Combine the `set_metrics` and `set_size` calls. This might be a small optimization in some situations, maybe when both font size and text bounds change in the same frame, or when spawning new text. I did measure a ~500 microsecond improvement in `text_system` for `many_buttons --respawn`, but that may have just been noise. |
||
|---|---|---|
| .. | ||
| bounds.rs | ||
| error.rs | ||
| FiraMono-subset.ttf | ||
| font_atlas_set.rs | ||
| font_atlas.rs | ||
| font_loader.rs | ||
| font.rs | ||
| glyph.rs | ||
| lib.rs | ||
| pipeline.rs | ||
| text2d.rs | ||
| text_access.rs | ||
| text.rs | ||