Open lcdsmao opened 3 years ago
Thanks.
Robot
font supported English. So we use NotoSans
😢
Do you have any good ideas?
I do, just configure tests to use google fonts folder to load custom fonts like we do with eBAy's Golden tool kit ie by using the Golden toolkit:
Future<void> testExecutable(FutureOr<void> Function() testMain) async { return GoldenToolkit.runWithConfiguration( () async { await loadAppFonts(); await testMain(); }, config: GoldenToolkitConfiguration( // Currently, goldens are not generated/validated in CI for this repo. We have settled on the goldens for this package // being captured/validated by developers running on MacOSX. We may revisit this in the future if there is a reason to invest // in more sophistication skipGoldenAssertion: () => !Platform.isMacOS, ), ); }
That way we get more power without having to change anything in playbook
https://pub.dev/packages/golden_toolkit#loading-fonts
Here is how
golden_toolkit
loading roboto font: https://github.com/eBay/flutter_glove_box/blob/master/packages/golden_toolkit/lib/src/font_loader.dart