loadScenarioFonts function

Future<List<String>> loadScenarioFonts()

Loads every font the asset bundle's FontManifest.json declares — the project's own families plus MaterialIcons.

Both scenario lanes come through here, because a scenario that measures text in the fallback font is wrong in the one way nothing catches: it still renders, still passes most assertions, and reports the few that do not as RenderFlex overflowed by 3.5 pixels — a layout regression that never happened. The harness loads them at startup; flutter test used to have nobody to do it, so the same suite disagreed with itself across the two.

Cached, so the second caller awaits the first one's work rather than repeating it. FontLoader registers into a process-wide collection, so loading twice is waste and nothing else.

Implementation

Future<List<String>> loadScenarioFonts() => _loading ??= _load();