diff --git a/examples/stress_tests/many_text2d.rs b/examples/stress_tests/many_text2d.rs index 2575a0d92d..22a7d82517 100644 --- a/examples/stress_tests/many_text2d.rs +++ b/examples/stress_tests/many_text2d.rs @@ -31,10 +31,14 @@ const CODE_POINT_RANGES: [RangeInclusive; 5] = [ #[derive(FromArgs, Resource)] /// `many_text2d` stress test struct Args { - /// whether to use many different glyphs so that multiple separate font atlas textures are used. + /// whether to use many different glyphs to increase the amount of font atlas textures used. #[argh(switch)] many_glyphs: bool, + /// whether to use many different font sizes to increase the amount of font atlas textures used. + #[argh(switch)] + many_font_sizes: bool, + /// whether to force the text to recompute every frame by triggering change detection. #[argh(switch)] recompute: bool, @@ -186,7 +190,7 @@ fn print_counts( } fn random_text_font(rng: &mut ChaCha8Rng, args: &Args, font: Handle) -> TextFont { - let font_size = if args.many_glyphs { + let font_size = if args.many_font_sizes { *[10.0, 20.0, 30.0, 40.0, 50.0, 60.0].choose(rng).unwrap() } else { 60.0